Skip to content

Commit f4e51d8

Browse files
committed
performing the treatment of null fields
1 parent 921e2dc commit f4e51d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Database/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ private function compileNewQuery($query, $bindings)
352352

353353
$bindings = array_map(fn($v) => gettype($v) === 'string' ? str_replace('\'', '\'\'', $v) : $v, $bindings);
354354
$bindings = array_map(fn($v) => gettype($v) === 'string' ? "'{$v}'" : $v, $bindings);
355+
$bindings = array_map(fn($v) => gettype($v) === 'NULL' ? 'NULL' : $v, $bindings);
355356

356357
$newQuery = join(array_map(fn($k1, $k2) => $k1.$k2, $partQuery, $bindings));
357358
$newQuery = str_replace('[]', '', $newQuery);

0 commit comments

Comments
 (0)