Minor change use is_array before count this prevents a PHP Warninng.

This commit is contained in:
FusionPBX
2020-11-16 15:42:27 -07:00
committed by GitHub
parent f48d0ade4a
commit 708ae63440

View File

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