Skip to content

Commit f21aeb5

Browse files
authored
Merge pull request #223 from kazimolmez/patch-1
Fix Error: Uncaught TypeError: Argument 1 passed
2 parents dabd6b8 + bc6e1d0 commit f21aeb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ezQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ public function update(string $table = null, $keyValue, ...$whereConditions)
622622
$sql = "UPDATE $table SET ";
623623

624624
foreach ($keyValue as $key => $val) {
625-
if (\strtolower($val) == 'null') {
625+
if (is_null($val) || \strtolower($val) == 'null') {
626626
$sql .= "$key = NULL, ";
627627
} elseif (\in_array(\strtolower($val), array('current_timestamp()', 'date()', 'now()'))) {
628628
$sql .= "$key = CURRENT_TIMESTAMP(), ";

0 commit comments

Comments
 (0)