Skip to content

Commit a698c42

Browse files
authored
Merge pull request #1099 from ByteHamster/quote-null-value
Do not try to quote null value for SQL
2 parents c9f2b68 + 0f6c7f6 commit a698c42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Core/Frameworks/Flake/Core/Database.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,11 @@ function fullQuoteArray($arr, $table, $noQuote = false) {
178178

179179
foreach ($arr as $k => $v) {
180180
if ($noQuote === false || !in_array($k, $noQuote)) {
181-
$arr[$k] = $this->fullQuote($v, $table);
181+
if ($v === null) {
182+
$arr[$k] = "NULL";
183+
} else {
184+
$arr[$k] = $this->fullQuote($v, $table);
185+
}
182186
}
183187
}
184188

0 commit comments

Comments
 (0)