From 708ae634401dfbeb164b392cb453bc0726e0fd0f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 16 Nov 2020 15:42:27 -0700 Subject: [PATCH] Minor change use is_array before count this prevents a PHP Warninng. --- app/destinations/destination_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index f5ba0c6f29..d5b4d2e65e 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -760,7 +760,7 @@ } //pre-populate the form - if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { + if (is_array($_GET) > 0 && $_POST["persistformvar"] != "true") { if (is_uuid($_GET["id"])) { $destination_uuid = $_GET["id"]; $sql = "select * from v_destinations "; @@ -816,7 +816,7 @@ unset($sql, $parameters); //add an empty row to the array - $x = count($dialplan_details); + $x = (is_array($dialplan_details)) ? count($dialplan_details) : $x = 0; $limit = $x + 1; while($x < $limit) { $dialplan_details[$x]['domain_uuid'] = $domain_uuid;