Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated * Passing null to parameter #1 ($string) of type string is deprecated * php 8.1 fixes * php 8.1 fixes - replace strlen($var) > 0 with !empty($var) * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - strlower with null * php 8.1 fixes - strreplace with null * php 8.1 fixes - passing null to base64_decode * php 8.1 fixes - check for false and check for null on $this->dir * php 8.1 fixes - remove assignment of $db variable to modules object * php 8.1 fixes - avoid sending null to substr * php 8.1 fixes - change ${var} to {$var} * php 8.1 fixes - check for null before preg_replace * php 8.1 fixes - remove setting db variable on domains object * php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null * php 8.1 fixes - set empty string if $_REQUEST['show'] is not available * php 8.1 fixes * php 8.1 fixes - correct $_POST checking syntax * php 8.1 fixes - correct $_POST variables * php 8.1 fixes * Use brackets consistently * Update user_setting_edit.php * Change to not empty * Update device.php * Update text.php --------- Co-authored-by: Tim Fry <tim@voipstratus.com> Co-authored-by: FusionPBX <markjcrane@gmail.com>
This commit is contained in:
co-authored by
Tim Fry
FusionPBX
parent
ebbb2f1a72
commit
fef8165be2
@@ -92,7 +92,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
@@ -103,11 +103,11 @@
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['label-required-domain_uuid']."<br>\n"; }
|
||||
if (strlen($dialplan_name) == 0) { $msg .= $text['label-required-dialplan_name']."<br>\n"; }
|
||||
if (strlen($dialplan_number) == 0) { $msg .= $text['label-required-dialplan_number']."<br>\n"; }
|
||||
//if (strlen($dialplan_action) == 0) { $msg .= $text['label-required-action']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//if (empty($domain_uuid)) { $msg .= $text['label-required-domain_uuid']."<br>\n"; }
|
||||
if (empty($dialplan_name)) { $msg .= $text['label-required-dialplan_name']."<br>\n"; }
|
||||
if (empty($dialplan_number)) { $msg .= $text['label-required-dialplan_number']."<br>\n"; }
|
||||
//if (empty($dialplan_action)) { $msg .= $text['label-required-action']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
@@ -180,7 +180,7 @@
|
||||
//build update array
|
||||
$array['dialplans'][0]['dialplan_uuid'] = $dialplan_uuid;
|
||||
$array['dialplans'][0]['dialplan_continue'] = 'false';
|
||||
if (strlen($dialplan_context) > 0) {
|
||||
if (!empty($dialplan_context)) {
|
||||
$array['dialplans'][0]['dialplan_context'] = $dialplan_context;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@
|
||||
} //if
|
||||
|
||||
//add to query for default anti-action (if defined)
|
||||
if (strlen($dialplan_anti_action_app) > 0) {
|
||||
if (!empty($dialplan_anti_action_app)) {
|
||||
|
||||
//increment group number, reset order number
|
||||
$dialplan_detail_group = 999;
|
||||
@@ -663,8 +663,8 @@
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['domain_name']; }
|
||||
if (strlen($dialplan_enabled) == 0) { $dialplan_enabled = 'true'; }
|
||||
if (empty($dialplan_context)) { $dialplan_context = $_SESSION['domain_name']; }
|
||||
if (empty($dialplan_enabled)) { $dialplan_enabled = 'true'; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
@@ -1095,7 +1095,7 @@ if ($action == 'update') {
|
||||
foreach ($preset as $preset_name => $preset_variables) {
|
||||
$checked = is_array($current_presets) && in_array($preset_name, $current_presets) ? "checked='checked'" : null;
|
||||
$preset_group_id = $preset_number * 5 + 100;
|
||||
if (strlen($text['label-preset_'.$preset_name]) > 0) {
|
||||
if (!empty($text['label-preset_'.$preset_name])) {
|
||||
$label_preset_name = $text['label-preset_'.$preset_name];
|
||||
}
|
||||
else {
|
||||
@@ -1233,7 +1233,7 @@ if ($action == 'update') {
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||
if (strlen($domain_uuid) == 0) {
|
||||
if (empty($domain_uuid)) {
|
||||
echo " <option value='' selected='selected'>".$text['label-global']."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user