From dae1cc990947a198db35ee816195c0839643b28f Mon Sep 17 00:00:00 2001 From: fusionate Date: Wed, 10 May 2023 23:27:52 +0000 Subject: [PATCH] Dashboard - Caller ID: Updates for PHP 8.1 --- app/extensions/resources/dashboard/caller_id.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/extensions/resources/dashboard/caller_id.php b/app/extensions/resources/dashboard/caller_id.php index abd06c1c99..1a765b370a 100644 --- a/app/extensions/resources/dashboard/caller_id.php +++ b/app/extensions/resources/dashboard/caller_id.php @@ -45,7 +45,7 @@ } //add or update the database - if (is_array($_POST['extensions']) && @sizeof($_POST['extensions']) != 0) { + if (isset($_POST['extensions']) && is_array($_POST['extensions']) && @sizeof($_POST['extensions']) != 0) { //validate the token $token = new token; @@ -148,6 +148,11 @@ unset($sql, $parameters); } + + //set defaults + unset($stats); + $stats['defined'] = $stats['undefined'] = 0; + //determine stats if (is_array($extensions) && @sizeof($extensions) != 0) { foreach ($extensions as $row) { @@ -160,10 +165,6 @@ } } - //set defaults - if ($stats['defined'] == null) { $stats['defined'] = 0; } - if ($stats['undefined'] == null) { $stats['undefined'] = 0; } - //set the row style $c = 0; $row_style["0"] = "row_style0"; @@ -295,7 +296,7 @@ echo "\n"; echo ""; - $n++; + //$n++; echo "\n"; echo "\n";