Do not try to quote null value for SQL
This commit is contained in:
parent
c9f2b688b7
commit
0f6c7f6942
1 changed files with 5 additions and 1 deletions
|
@ -178,7 +178,11 @@ abstract class Database extends \Flake\Core\FLObject {
|
||||||
|
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if ($noQuote === false || !in_array($k, $noQuote)) {
|
if ($noQuote === false || !in_array($k, $noQuote)) {
|
||||||
$arr[$k] = $this->fullQuote($v, $table);
|
if ($v === null) {
|
||||||
|
$arr[$k] = "NULL";
|
||||||
|
} else {
|
||||||
|
$arr[$k] = $this->fullQuote($v, $table);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue