diff --git a/lib/ezQuery.php b/lib/ezQuery.php index 21fccb3..4d0ff83 100644 --- a/lib/ezQuery.php +++ b/lib/ezQuery.php @@ -622,7 +622,7 @@ public function update(string $table = null, $keyValue, ...$whereConditions) $sql = "UPDATE $table SET "; foreach ($keyValue as $key => $val) { - if (\strtolower($val) == 'null') { + if (is_null($val) || \strtolower($val) == 'null') { $sql .= "$key = NULL, "; } elseif (\in_array(\strtolower($val), array('current_timestamp()', 'date()', 'now()'))) { $sql .= "$key = CURRENT_TIMESTAMP(), ";