From b17748dc1e598f3b0de5cc89f2800510712b2497 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 11 Sep 2022 10:22:23 -0600 Subject: [PATCH] Use loop only if destination_actions is an array --- app/destinations/destinations.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 8534ffe87d..c2ebf118be 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -282,9 +282,11 @@ //prepare the destination actions $destination_actions = json_decode($row['destination_actions'], true); - foreach($destination_actions as $action) { - $destination_app = $action['destination_app']; - $destination_data = $action['destination_data']; + if (is_array($destination_actions)) { + foreach($destination_actions as $action) { + $destination_app = $action['destination_app']; + $destination_data = $action['destination_data']; + } } //create the row link