From 56ca7fd802e3c51bbbadc99f084a6d0771301882 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 13 Jun 2018 07:52:38 -0600 Subject: [PATCH] Update dialplan_edit.php --- app/dialplans/dialplan_edit.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/dialplans/dialplan_edit.php b/app/dialplans/dialplan_edit.php index 7afc3451be..51be6a168f 100644 --- a/app/dialplans/dialplan_edit.php +++ b/app/dialplans/dialplan_edit.php @@ -567,12 +567,12 @@ 0) { + if (is_array($details)) { echo "\n"; $x = 0; - if (is_array($details)) foreach($details as $group) { + foreach($details as $group) { if ($x != 0) { echo ""; @@ -683,7 +683,7 @@ if (strlen($row) > 0) { $application = explode(",", $row); if ($application[0] != "name" && stristr($application[0], "[") != true) { - echo " \n"; + echo " \n"; } } } @@ -705,12 +705,12 @@ $sql = "select gateway from v_gateways where gateway_uuid = '".$bridge_statement[2]."' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - if (count($result) > 0) { + $gateways = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($gateways)) { $gateway_name = $result[0]['gateway']; $dialplan_detail_data_mod = str_replace($bridge_statement[2], $gateway_name, $dialplan_detail_data); } - unset ($prep_statement, $sql, $bridge_statement); + unset ($prep_statement, $sql, $bridge_statement, $gateways); } } echo " \n"; @@ -744,7 +744,7 @@ //group echo "\n"; //end the row @@ -802,7 +802,7 @@ } $x++; } //end foreach - unset($sql, $result, $row_count); + unset($sql, $details); echo "


\n"; if ($element['hidden']) { - echo " \n"; + echo " \n"; } echo " \n"; /* @@ -792,7 +792,7 @@ echo " \n"; if ($element['hidden']) { //echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo "
"; @@ -813,7 +813,7 @@ echo "
\n"; echo "
\n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo " \n"; echo "
\n";