From 0f6c7f69420cd15a08b81f1dd29db9084cb1f745 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 4 Mar 2022 18:24:47 +0100 Subject: [PATCH] Do not try to quote null value for SQL --- Core/Frameworks/Flake/Core/Database.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/Frameworks/Flake/Core/Database.php b/Core/Frameworks/Flake/Core/Database.php index 4bc0b8a..a486ed2 100644 --- a/Core/Frameworks/Flake/Core/Database.php +++ b/Core/Frameworks/Flake/Core/Database.php @@ -178,7 +178,11 @@ abstract class Database extends \Flake\Core\FLObject { 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); + } } }