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
@@ -169,7 +169,7 @@ if (!class_exists('domains')) {
|
||||
}
|
||||
|
||||
//delete the directories
|
||||
if (strlen($domain_name) > 0) {
|
||||
if (!empty($domain_name)) {
|
||||
//set the needle
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
$v_needle = 'v_'.$domain_name.'_';
|
||||
@@ -180,24 +180,24 @@ if (!class_exists('domains')) {
|
||||
|
||||
//delete the dialplan
|
||||
@unlink($_SESSION['switch']['dialplan']['dir'].'/'.$domain_name.'.xml');
|
||||
if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['dialplan']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['dialplan']['dir'].'/'.$domain_name);
|
||||
}
|
||||
|
||||
//delete the dialplan public
|
||||
@unlink($_SESSION['switch']['dialplan']['dir'].'/public/'.$domain_name.'.xml');
|
||||
if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['dialplan']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['dialplan']['dir'].'/public/'.$domain_name);
|
||||
}
|
||||
|
||||
//delete the extension
|
||||
@unlink($_SESSION['switch']['extensions']['dir'].'/'.$domain_name.'.xml');
|
||||
if (strlen($_SESSION['switch']['extensions']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['extensions']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['extensions']['dir'].'/'.$domain_name);
|
||||
}
|
||||
|
||||
//delete fax
|
||||
if (strlen($_SESSION['switch']['storage']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['storage']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['storage']['dir'].'/fax/'.$domain_name);
|
||||
}
|
||||
|
||||
@@ -237,12 +237,12 @@ if (!class_exists('domains')) {
|
||||
}
|
||||
|
||||
//delete the recordings
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['recordings']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$domain_name);
|
||||
}
|
||||
|
||||
//delete voicemail
|
||||
if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) {
|
||||
if (!empty($_SESSION['switch']['voicemail']['dir'])) {
|
||||
system('rm -rf '.$_SESSION['switch']['voicemail']['dir'].'/'.$domain_name);
|
||||
}
|
||||
}
|
||||
@@ -460,7 +460,7 @@ if (!class_exists('domains')) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if (empty($subcategory)) {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['default_setting_value'];
|
||||
}
|
||||
@@ -512,7 +512,7 @@ if (!class_exists('domains')) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if (empty($subcategory)) {
|
||||
//$$category[$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['domain_setting_value'];
|
||||
@@ -549,8 +549,8 @@ if (!class_exists('domains')) {
|
||||
$name = $row['user_setting_name'];
|
||||
$category = $row['user_setting_category'];
|
||||
$subcategory = $row['user_setting_subcategory'];
|
||||
if (strlen($row['user_setting_value']) > 0) {
|
||||
if (strlen($subcategory) == 0) {
|
||||
if (!empty($row['user_setting_value'])) {
|
||||
if (empty($subcategory)) {
|
||||
//$$category[$name] = $row['domain_setting_value'];
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['user_setting_value'];
|
||||
@@ -575,7 +575,7 @@ if (!class_exists('domains')) {
|
||||
}
|
||||
|
||||
//set the values from the session variables
|
||||
if (strlen($_SESSION['domain']['time_zone']['name']) > 0) {
|
||||
if (!empty($_SESSION['domain']['time_zone']['name'])) {
|
||||
//server time zone
|
||||
$_SESSION['time_zone']['system'] = date_default_timezone_get();
|
||||
//domain time zone set in system settings
|
||||
@@ -674,7 +674,7 @@ if (!class_exists('domains')) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if (empty($subcategory)) {
|
||||
if ($name == "array") {
|
||||
$_SESSION[$category][] = $row['default_setting_value'];
|
||||
}
|
||||
@@ -699,7 +699,7 @@ if (!class_exists('domains')) {
|
||||
$name = $row['domain_setting_name'];
|
||||
$category = $row['domain_setting_category'];
|
||||
$subcategory = $row['domain_setting_subcategory'];
|
||||
if (strlen($subcategory) == 0) {
|
||||
if (empty($subcategory)) {
|
||||
//$$category[$name] = $row['domain_setting_value'];
|
||||
$_SESSION[$category][$name] = $row['domain_setting_value'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user