5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2024-12-24 01:33:48 +03:00

JSONSchema::check_type: return success (not value)

This commit is contained in:
Dietmar Maurer 2017-02-25 09:24:24 +01:00
parent dc9c3ffa6c
commit 79501b2a58

View 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;