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