Skip to content

Commit 8e2fdc1

Browse files
committed
fix: nullable field empty
1 parent 8ab3a5c commit 8e2fdc1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

includes/classes/API.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ private function patch($query, $db = null)
10531053
if (is_array($value)) {
10541054
$value = serialize($value);
10551055
}
1056-
if (is_string($value) && strtolower($value) == 'null') {
1056+
if (is_string($value) && strtolower($value) === 'null') {
10571057
$value = null;
10581058
}
10591059
$key = ':' . $key;
@@ -1069,9 +1069,6 @@ private function patch($query, $db = null)
10691069
foreach ($where_values as $key => $value) {
10701070
$key = ':' . $key;
10711071
$sql_compiled = self::debugCompileSQL($sql_compiled, $key, $value);
1072-
if (empty($value)) {
1073-
$value = null;
1074-
}
10751072
$sth->bindValue($key, $value);
10761073
}
10771074
}

0 commit comments

Comments
 (0)