Prevent an error if all Time conditions presets are disabled

This commit is contained in:
FusionPBX 2023-09-01 14:01:47 -06:00 committed by GitHub
parent c285a104f0
commit 0e2506aa8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@
foreach ($dialplan_details as $i => $row) {
if ($row['dialplan_detail_tag'] == 'action' && $row['dialplan_detail_type'] == 'set' && strpos($row['dialplan_detail_data'], 'preset=') === 0) {
$preset_name = explode('=',$row['dialplan_detail_data'])[1];
if (in_array($preset_name, $valid_presets)) {
if (!empty($valid_presets) && in_array($preset_name, $valid_presets)) {
$dialplan_detail_group_preset[$row['dialplan_detail_group']] = $preset_name;
}
else {