From: Dietmar Maurer Date: Sat, 25 Feb 2017 08:24:24 +0000 (+0100) Subject: JSONSchema::check_type: return success (not value) X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=79501b2a58a7cd5d43c0014fbd336ccfd5fbdc03;hp=dc9c3ffa6c415784664e11df10377703cf18941a JSONSchema::check_type: return success (not value) --- diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 0737459..936c3cf 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -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;