#11739 Fixed deprecated functions

This commit is contained in:
Daniel Maya 2023-07-26 14:18:20 +02:00
parent c2d7c10442
commit bee65bc575
6 changed files with 15 additions and 7 deletions

View File

@ -502,9 +502,13 @@ if ($access_console_node === true) {
$sub2[$extmenu['sec2']]['refr'] = 0;
} else {
if (is_array($extmenu) === true && array_key_exists('fatherId', $extmenu) === true) {
if (strlen($extmenu['fatherId']) > 0) {
if (empty($extmenu['fatherId']) === false
&& strlen($extmenu['fatherId']) > 0
) {
if (array_key_exists('subfatherId', $extmenu) === true) {
if (strlen($extmenu['subfatherId']) > 0) {
if (empty($extmenu['subfatherId']) === false
&& strlen($extmenu['subfatherId']) > 0
) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['text'] = __($extmenu['name']);
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['id'] = str_replace(' ', '_', $extmenu['name']);
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['refr'] = 0;

View File

@ -907,7 +907,7 @@ function set_cookie($name, $value)
{
if (is_null($value)) {
unset($_COOKIE[$value]);
setcookie($name, null, -1, '/');
setcookie($name, '', -1, '/');
} else {
setcookie($name, $value);
}

View File

@ -353,7 +353,7 @@ function menu_print_menu(&$menu)
$secExtensionBool = false;
if ($secExtensionBool) {
if (strlen($sub['icon']) > 0) {
if (empty($sub['icon']) === false && strlen($sub['icon']) > 0) {
$icon_enterprise = false;
if (isset($sub['enterprise'])) {
$icon_enterprise = (bool) $sub['enterprise'];
@ -380,7 +380,7 @@ function menu_print_menu(&$menu)
$secExtension = $sub['sec'];
}
if (strlen($secExtension) > 0) {
if (empty($secExtension) === false && strlen($secExtension) > 0) {
$secUrl = $secExtension;
$extensionInMenu = 'extension_in_menu='.$mainsec.'&';
} else {

View File

@ -4788,7 +4788,10 @@ function ui_get_url_refresh($params=false, $relative=true, $add_post=true)
$url .= $key.'['.$k.']='.$v.'&';
}
} else {
$url .= $key.'='.io_safe_input(rawurlencode($value)).'&';
$aux = (empty($value) === false)
? io_safe_input(rawurlencode($value))
: '';
$url .= $key.'='.$aux.'&';
}
}

View File

@ -59,6 +59,7 @@ class StreamReader {
class StringReader {
var $_pos;
var $_str;
var $is_overloaded;
function __construct($str='') {
$this->_str = $str;

View File

@ -292,7 +292,7 @@ enterprise_include_once('include/auth/saml.php');
if (isset($config['id_user']) === false) {
// Clear error messages.
unset($_COOKIE['errormsg']);
setcookie('errormsg', null, -1);
setcookie('errormsg', '', -1);
if (isset($_GET['login']) === true) {
include_once 'include/functions_db.php';