Skip to content

Commit d7cf26e

Browse files
committed
fix: prepare null issue
1 parent fb4d0ad commit d7cf26e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/QueryBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,9 +995,12 @@ public function prepare($sql = null)
995995
$sql = $this->{'prepare' . $this->_method}();
996996
}
997997

998-
return empty($this->bindings)
998+
$sql = empty($this->bindings)
999999
|| strpos($sql, '%') === false
10001000
? $sql : Connection::prepare($sql, $this->bindings);
1001+
1002+
return str_replace("''",'NULL', $sql);
1003+
10011004
}
10021005

10031006
/**

0 commit comments

Comments
 (0)