Update database.php

This commit is contained in:
FusionPBX
2025-10-04 12:24:17 -06:00
committed by GitHub
parent abcd983503
commit d329a18ee1

View File

@@ -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);