From 598eb4ab31c5b7c5405734d71e2624a2982ba8bc Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 13 Oct 2022 08:43:32 -0600 Subject: [PATCH] Wrap is_array arround foreach --- app/destinations/destination_edit.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index b462cad371..c3f9f19a61 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -1455,10 +1455,12 @@ echo "\n"; echo "\n"; $x=0; - foreach($destination_actions as $row) { - echo $destination->select('dialplan', "destination_actions[$x]", $row['destination_app'].':'.$row['destination_data']); - echo "
\n"; - $x++; + if (is_array($destination_actions)) { + foreach($destination_actions as $row) { + echo $destination->select('dialplan', "destination_actions[$x]", $row['destination_app'].':'.$row['destination_data']); + echo "
\n"; + $x++; + } } echo $destination->select('dialplan', "destination_actions[$x]", ''); echo "
\n";