From: Dietmar Maurer Date: Fri, 4 Sep 2015 06:52:57 +0000 (+0200) Subject: get_options: avoid warning for -list format X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=43479146338948434f0b08ef854c96281ee0f268 get_options: avoid warning for -list format --- diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 47aa278..32d461c 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -1139,7 +1139,7 @@ sub get_options { if ($pd->{format} =~ m/-list/) { # allow --vmid 100 --vmid 101 and --vmid 100,101 # allow --dow mon --dow fri and --dow mon,fri - $opts->{$p} = join(",", @{$opts->{$p}}); + $opts->{$p} = join(",", @{$opts->{$p}}) if ref($opts->{$p}) eq 'ARRAY'; } elsif ($pd->{format} =~ m/-alist/) { # we encode array as \0 separated strings # Note: CGI.pm also use this encoding