Merge pull request #1099 from ByteHamster/quote-null-value

Do not try to quote null value for SQL
This commit is contained in:
ByteHamster 2022-03-20 10:35:30 +01:00 committed by GitHub
commit a698c42952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,9 +178,13 @@ 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)) {
if ($v === null) {
$arr[$k] = "NULL";
} else {
$arr[$k] = $this->fullQuote($v, $table); $arr[$k] = $this->fullQuote($v, $table);
} }
} }
}
return $arr; return $arr;
} }