Skip to content

Commit

Permalink
Merge pull request #1099 from ByteHamster/quote-null-value
Browse files Browse the repository at this point in the history
Do not try to quote null value for SQL
  • Loading branch information
ByteHamster authored Mar 20, 2022
2 parents c9f2b68 + 0f6c7f6 commit a698c42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Core/Frameworks/Flake/Core/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ function fullQuoteArray($arr, $table, $noQuote = false) {

foreach ($arr as $k => $v) {
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);
}
}
}

Expand Down

0 comments on commit a698c42

Please sign in to comment.