From d329a18ee124bcc545b867c74be7a2a5f8e29078 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 4 Oct 2025 12:24:17 -0600 Subject: [PATCH] Update database.php --- resources/classes/database.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index eac565f757..d1bc4688de 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -2718,8 +2718,10 @@ class database { //update the special values if (is_array($row)) { foreach ($row as $k => $v) { - if (!is_array($v)) { continue; } + //sanitize the key $k = self::sanitize($k); + + //save the key value pairs to the temp_array if (!isset($v) || (isset($v) && $v == '')) { $temp_array[$k] = null; } @@ -2732,6 +2734,14 @@ class database { elseif ($v === "remote_address()") { $temp_array[$k] = $_SERVER['REMOTE_ADDR']; } + if (gettype($v) === 'boolean') { + if ($v) { + $v = true; + } else { + $v = false; + } + $temp_array[$k] = $v; + } else { if (gettype($v) === 'string') { $v = trim($v);