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
+10
-10
@@ -138,7 +138,7 @@
|
||||
$fax_caller_id_number = $_POST["fax_caller_id_number"];
|
||||
$fax_toll_allow = $_POST["fax_toll_allow"];
|
||||
$fax_forward_number = $_POST["fax_forward_number"];
|
||||
if (strlen($fax_destination_number) == 0) {
|
||||
if (empty($fax_destination_number)) {
|
||||
$fax_destination_number = $fax_extension;
|
||||
}
|
||||
if (strlen($fax_forward_number) > 3) {
|
||||
@@ -227,7 +227,7 @@
|
||||
clearstatcache();
|
||||
|
||||
//process the data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update" && is_uuid($_POST["fax_uuid"]) && permission_exists('fax_extension_edit')) {
|
||||
@@ -243,9 +243,9 @@
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($fax_extension) == 0) { $msg .= "".$text['confirm-ext']."<br>\n"; }
|
||||
if (strlen($fax_name) == 0) { $msg .= "".$text['confirm-fax']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (empty($fax_extension)) { $msg .= "".$text['confirm-ext']."<br>\n"; }
|
||||
if (empty($fax_name)) { $msg .= "".$text['confirm-fax']."<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";
|
||||
@@ -343,11 +343,11 @@
|
||||
$array['fax'][0]['fax_caller_id_name'] = $fax_caller_id_name;
|
||||
$array['fax'][0]['fax_caller_id_number'] = $fax_caller_id_number;
|
||||
$array['fax'][0]['fax_toll_allow'] = $fax_toll_allow;
|
||||
if ($action == "add" && strlen($fax_forward_number) > 0) {
|
||||
if ($action == "add" && !empty($fax_forward_number)) {
|
||||
$array['fax'][0]['fax_forward_number'] = $fax_forward_number;
|
||||
}
|
||||
if ($action == "update") {
|
||||
$array['fax'][0]['fax_forward_number'] = strlen($fax_forward_number) > 0 ? $fax_forward_number : null;
|
||||
$array['fax'][0]['fax_forward_number'] = !empty($fax_forward_number) ? $fax_forward_number : null;
|
||||
}
|
||||
if (permission_exists('fax_send_greeting')) {
|
||||
$array['fax'][0]['fax_send_greeting'] = strlen($fax_send_greeting) != 0 ? $fax_send_greeting : null;
|
||||
@@ -775,7 +775,7 @@
|
||||
while ($file = readdir($dh)) {
|
||||
if ($file != "." && $file != ".." && $file[0] != '.') {
|
||||
if (!is_dir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)) {
|
||||
$selected = ($fax_send_greeting == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file && strlen($fax_send_greeting) > 0) ? true : false;
|
||||
$selected = ($fax_send_greeting == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file && !empty($fax_send_greeting)) ? true : false;
|
||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)."' ".(($selected) ? "selected='selected'" : null).">".escape($file)."</option>\n";
|
||||
if ($selected) { $tmp_selected = true; }
|
||||
}
|
||||
@@ -805,7 +805,7 @@
|
||||
if (is_array($sound_files)) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($sound_files as $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (!empty($value)) {
|
||||
if (substr($fax_send_greeting, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$fax_send_greeting = substr($fax_send_greeting, 71);
|
||||
}
|
||||
@@ -817,7 +817,7 @@
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//select
|
||||
if (strlen($fax_send_greeting) > 0) {
|
||||
if (!empty($fax_send_greeting)) {
|
||||
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||
if (!$tmp_selected) {
|
||||
echo "<optgroup label='selected'>\n";
|
||||
|
||||
Reference in New Issue
Block a user