JSONSchema::check_type: return success (not value)
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 25 Feb 2017 08:24:24 +0000 (09:24 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 25 Feb 2017 08:24:24 +0000 (09:24 +0100)
src/PVE/JSONSchema.pm

index 0737459..936c3cf 100644 (file)
@@ -678,7 +678,7 @@ sub check_type {
                        return 1;
                    #} elsif ($value =~ m/^(0|false|no|off)$/i) {
                    } elsif ($value eq '0') {
-                       return 0;
+                       return 1; # return success (not value)
                    } else {
                        add_error($errors, $path, "type check ('$type') failed - got '$value'");
                        return undef;