mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix PHP 8.1 errors
This commit is contained in:
@@ -35,7 +35,7 @@ if ($domains_processed == 1) {
|
||||
$database = new database;
|
||||
$voicemails = $database->select($sql, null, 'all');
|
||||
unset($sql, $parameters);
|
||||
if (is_array($voicemails) && @sizeof($voicemails) != 0) {
|
||||
if (!empty($voicemails) && is_array($voicemails) && @sizeof($voicemails) != 0) {
|
||||
foreach($voicemails as $row) {
|
||||
if (is_numeric($row['voicemail_id'])) {
|
||||
if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$row['domain_name']."/".$row['voicemail_id'])) {
|
||||
@@ -46,7 +46,7 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
|
||||
//define initial, get current, define correct languages folder paths
|
||||
$switch_configuration_dir = $_SESSION['switch']['conf']['dir'] != '' ? $_SESSION['switch']['conf']['dir'] : '/etc/freeswitch';
|
||||
$switch_configuration_dir = !empty($_SESSION['switch']['conf']['dir']) ? $_SESSION['switch']['conf']['dir'] : '/etc/freeswitch';
|
||||
$switch_languages_dir_initial = $switch_configuration_dir.'/lang';
|
||||
$switch_languages_dir_current = $_SESSION['switch']['languages']['dir'];
|
||||
$switch_languages_dir_correct = $switch_configuration_dir.'/languages';
|
||||
@@ -85,7 +85,7 @@ if ($domains_processed == 1) {
|
||||
@file_put_contents($switch_configuration_dir.'/freeswitch.xml', $switch_xml_content);
|
||||
}
|
||||
$folder_contents = scandir($switch_languages_dir_correct);
|
||||
if (is_array($folder_contents) && @sizeof($folder_contents) != 0) {
|
||||
if (!empty($folder_contents) && is_array($folder_contents) && @sizeof($folder_contents) != 0) {
|
||||
foreach ($folder_contents as $language_abbreviation) {
|
||||
if ($language_abbreviation == '.' || $language_abbreviation == '..') { continue; }
|
||||
// adjust language xml file to include all xml phrase files in the vm folder
|
||||
|
||||
Reference in New Issue
Block a user