Fix all PHP 8.1 messages for upgrade.php

This commit is contained in:
markjcrane
2023-05-17 10:07:49 -06:00
parent 6816921f47
commit 6d7e125743
22 changed files with 215 additions and 152 deletions
+10 -8
View File
@@ -33,7 +33,7 @@ if ($domains_processed == 1) {
$ivr_menus = $database->select($sql, null, 'all');
unset($sql);
if (is_array($ivr_menus)) {
if (!empty($ivr_menus)) {
//get the domain list
$sql = "select * from v_domains ";
@@ -42,16 +42,18 @@ if ($domains_processed == 1) {
//update the ivr menu context
$x = 0;
foreach ($ivr_menus as $row) {
foreach ($domains as $domain) {
if ($row['domain_uuid'] == $domain['domain_uuid']) {
$array['ivr_menus'][$x]['ivr_menu_uuid'] = $row['ivr_menu_uuid'];
$array['ivr_menus'][$x]['ivr_menu_context'] = $domain['domain_name'];
$x++;
if (!empty($ivr_menus)) {
foreach ($ivr_menus as $row) {
foreach ($domains as $domain) {
if ($row['domain_uuid'] == $domain['domain_uuid']) {
$array['ivr_menus'][$x]['ivr_menu_uuid'] = $row['ivr_menu_uuid'];
$array['ivr_menus'][$x]['ivr_menu_context'] = $domain['domain_name'];
$x++;
}
}
}
}
if (is_array($array) && @sizeof($array) != 0) {
if (!empty($array)) {
$p = new permissions;
$p->add('ivr_menu_edit', 'temp');