Time Conditions - Edit: Mitigate PHP 8.x warnings.

This commit is contained in:
fusionate
2024-05-13 11:22:32 -06:00
parent 69524a5162
commit e81220d997
3 changed files with 10 additions and 10 deletions

View File

@@ -26,8 +26,8 @@
$destinations = $destination->get($destination_type);
//show the select
echo " <select name='subaction' id='action' class='formfld' style='".$select_style."'>\n";
echo " <option value=''></option>\n";
echo " <select name='subaction' id='action' class='formfld' ".(!empty($select_style) ? "style='".$select_style."'" : null).">\n";
echo " <option value=''></option>\n";
foreach($destinations as $key => $rows) {
$singular = $destination->singular($key);
if ($key == $action && permission_exists("{$singular}_destinations")) {
@@ -50,12 +50,12 @@
$select_label = str_replace('email-icon', '&#9993', $select_label);
//add the select option
$uuid = isset($row[$singular.'_uuid']) ? $row[$singular.'_uuid'] : $row['uuid'];
echo " <option id='{$uuid}' value='".$select_value."'>".$select_label."</option>\n";
$uuid = isset($row[$singular.'_uuid']) ? $row[$singular.'_uuid'] : ($row['uuid'] ?? '');
echo " <option id='".$uuid."' value='".$select_value."'>".$select_label."</option>\n";
}
}
}
}
echo " </select>\n";
?>
?>

View File

@@ -826,8 +826,8 @@
$xml .= "</extension>\n";
}
//add to the dialplanss
$dialplans[$previous_dialplan_uuid] = $xml;
//add to the dialplans
$dialplans[$previous_dialplan_uuid] = $xml ?? '';
$xml = '';
$dialplan_tag_status = "closed";
@@ -1039,7 +1039,7 @@
//set the xml array and then concatenate the array to a string
//$xml .= " </context>\n";
///$xml .= " </section>\n";
//$xml .= " </section>\n";
//$xml .= "</document>\n";
} //end if source = details

View File

@@ -73,7 +73,7 @@
$dialplan_number = $_POST["dialplan_number"];
$dialplan_order = $_POST["dialplan_order"];
$dialplan_anti_action = $_POST["dialplan_anti_action"];
$dialplan_anti_action = $_POST["dialplan_anti_action"] ?? '';
$dialplan_anti_action_array = explode(":", $dialplan_anti_action);
$dialplan_anti_action_app = array_shift($dialplan_anti_action_array);
$dialplan_anti_action_data = join(':', $dialplan_anti_action_array);
@@ -272,7 +272,7 @@
if (is_array($_REQUEST['variable'])) {
foreach ($_REQUEST['variable'] as $group_id => $meh) {
if (
(!empty($_REQUEST['preset']) && is_array($_REQUEST['preset']) && in_array($group_id, $_REQUEST['preset']) && $_REQUEST['dialplan_action'][$group_id] == '' && $_REQUEST['default_preset_action'] == '' && $_REQUEST['dialplan_anti_action'] == '') ||
(!empty($_REQUEST['preset']) && is_array($_REQUEST['preset']) && in_array($group_id, $_REQUEST['preset']) && empty($_REQUEST['dialplan_action'][$group_id]) && empty($_REQUEST['default_preset_action']) && empty($_REQUEST['dialplan_anti_action'])) ||
((empty($_REQUEST['preset']) || !is_array($_REQUEST['preset']) || !in_array($group_id, $_REQUEST['preset'])) && $_REQUEST['dialplan_action'][$group_id] == '')
) {
unset($_REQUEST['variable'][$group_id]);