On 01/12/2020 10:42, Dietmar Maurer wrote:
On 12/01/2020 10:41 AM Dietmar Maurer wrote:
for (my $i = 100; $i < 1; $i++) {
- return $i if !defined($idlist->{$i});
+ return int($i) if !defined($idlist->{$i});
IMO, this does not solve the problem, because
> On 12/01/2020 10:41 AM Dietmar Maurer wrote:
>
>
> > for (my $i = 100; $i < 1; $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
> for (my $i = 100; $i < 1; $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.
___
pve-devel mailing list
After taking a quick look, isn't there another instance just above in the code
on line 720 which would benefit from the same change?
-
if (my $vmid = $param->{vmid}) {
return $vmid if !defined($idlist->{$vmid});
^
raise_param_exc({
When call /cluster/nextid over API, it returns ID as a string format
like {"data":"100"}. in the API pve-viewer, the result type is an integer
format.
Signed-off-by: Moayad Almalat
---
PVE/API2/Cluster.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/API2/Cluster.pm