From 0e2506aa8b5cb82993d3c1abea557e46e9b4de21 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 1 Sep 2023 14:01:47 -0600 Subject: [PATCH] Prevent an error if all Time conditions presets are disabled --- app/time_conditions/time_condition_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php index 2b8f3435c4..2cc3ff625d 100644 --- a/app/time_conditions/time_condition_edit.php +++ b/app/time_conditions/time_condition_edit.php @@ -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 {