From 8c208174c2987bb5ed1037cfb61188f8be50ecd7 Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Thu, 23 Mar 2023 02:27:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= =?UTF-8?q?=20php=20(DB=20CLASS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/Models/DB.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib/Core/Models/DB.class.php b/core/lib/Core/Models/DB.class.php index 4e8748e..0e51a2b 100644 --- a/core/lib/Core/Models/DB.class.php +++ b/core/lib/Core/Models/DB.class.php @@ -235,8 +235,10 @@ } elseif ($param === 'value') { if (is_numeric($v)) { $result .= $v . ', '; + } elseif ($v === null) { + $result .= 'NULL, '; } else { - $result .= '\'' . addslashes($v) . '\', '; + $result .= '\'' . ($v === null ? null : addslashes($v)) . '\', '; } } }