From: Dietmar Maurer Date: Wed, 6 Jun 2018 04:37:22 +0000 (+0200) Subject: JSONSchema: fix getopt when invoking without arguments X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=commitdiff_plain;h=00e944c7cab8fefe285fbdeb60e446b3325cee0c JSONSchema: fix getopt when invoking without arguments --- diff --git a/PVE/JSONSchema.pm b/PVE/JSONSchema.pm index 0e722b8..edd1caf 100644 --- a/PVE/JSONSchema.pm +++ b/PVE/JSONSchema.pm @@ -1406,6 +1406,8 @@ sub get_options { raise("too many arguments\n", code => HTTP_BAD_REQUEST) if scalar(@$args) != 0; } + } else { + raise("not enough arguments\n", code => HTTP_BAD_REQUEST) if ref($arg_param) && scalar(@$arg_param); } if (my $pd = $schema->{properties}->{password}) {