]> git.proxmox.com Git - pve-client.git/blobdiff - PVE/JSONSchema.pm
JSONSchema: fix getopt when invoking without arguments
[pve-client.git] / PVE / JSONSchema.pm
index 0e722b81b0812c104a80eef3e526dec746884baa..edd1caf92a073e055f2e80d6d19f67ca1a71f394 100644 (file)
@@ -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}) {