Update for PHP 8.1

This commit is contained in:
FusionPBX 2023-05-09 18:39:24 -06:00 committed by GitHub
parent 32672b7472
commit c57fa0fc39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -240,7 +240,7 @@ if (!class_exists('menu')) {
header('Location: '.$this->location);
exit;
}
https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805e327
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
@ -926,9 +926,9 @@ if (!class_exists('menu')) {
break;
case 'fixed':
default:
$menu_type = 'fixed-'.($_SESSION['theme']['menu_position']['text'] != '' ? $_SESSION['theme']['menu_position']['text'] : 'top');
$menu_type = 'fixed-'.(!empty($_SESSION['theme']['menu_position']['text']) ? $_SESSION['theme']['menu_position']['text'] : 'top');
if (!http_user_agent('mobile')) {
$menu_width = $_SESSION['theme']['menu_width_fixed']['text'] != '' ? $_SESSION['theme']['menu_width_fixed']['text'] : 'calc(90% - 20px)';
$menu_width = !empty($_SESSION['theme']['menu_width_fixed']['text']) ? $_SESSION['theme']['menu_width_fixed']['text'] : 'calc(90% - 20px)';
}
$menu_brand = true;
$menu_corners = null;
@ -941,7 +941,7 @@ if (!class_exists('menu')) {
if ($menu_brand) {
//define menu brand mark
$menu_brand_text = ($_SESSION['theme']['menu_brand_text']['text'] != '') ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
$menu_brand_text = (!empty($_SESSION['theme']['menu_brand_text']['text'])) ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
switch ($_SESSION['theme']['menu_brand_type']['text']) {
case 'text':
$html .= " <a class='navbar-brand-text' href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
@ -1036,7 +1036,7 @@ if (!class_exists('menu')) {
$html .= " <ul class='navbar-nav ml-auto'>\n";
//current user
if ($_SESSION['theme']['user_visible']['text'] == 'true') {
if (isset($_SESSION['theme']['user_visible']['text']) && $_SESSION['theme']['user_visible']['text'] == 'true') {
$html .= " <li class='nav-item'>\n";
$html .= " <a class='header_user' href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".($_SESSION['theme']['body_header_icon_user']['text'] != '' ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
$html .= " </li>\n";