[pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

Stefan Reiter s.reiter at proxmox.com
Tue Dec 1 11:38:12 CET 2020


On 01/12/2020 10:42, Dietmar Maurer wrote:
> 
>> On 12/01/2020 10:41 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
>>
>>   
>>>   	for (my $i = 100; $i < 10000; $i++) {
>>> -	    return $i if !defined($idlist->{$i});
>>> +	    return int($i) if !defined($idlist->{$i});
>>
>> IMO, this does not solve the problem, because $i is already and int.
> 
> or does $idlist->{$i} converts $i to string??
> 

Without testing anything, just my two cents, but we previously had the 
issue where the JSON formatter in Perl would format a value based on 
it's last usage context - and in case of a hash access that's probably a 
string, even if $i "is" an int.





More information about the pve-devel mailing list