Use loop only if destination_actions is an array

This commit is contained in:
FusionPBX 2022-09-11 10:22:23 -06:00 committed by GitHub
parent c9a661de6f
commit b17748dc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

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