Functions: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-05-13 04:53:18 +00:00
parent 196125952b
commit adfdb7bae5
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -2118,14 +2118,14 @@ function number_pad($number,$n) {
}
break;
case 'exists':
return is_array($_SESSION['persistent'][$_SERVER['PHP_SELF']]) && @sizeof($_SESSION['persistent'][$_SERVER['PHP_SELF']]) != 0 ? true : false;
return !empty($_SESSION['persistent']) && is_array($_SESSION['persistent'][$_SERVER['PHP_SELF']]) && @sizeof($_SESSION['persistent'][$_SERVER['PHP_SELF']]) != 0 ? true : false;
break;
case 'load':
// $array is expected to be the name of the array to create containing the key / value pairs
if ($array && !is_array($array)) {
global $$array;
}
if (is_array($_SESSION['persistent'][$_SERVER['PHP_SELF']]) && @sizeof($_SESSION['persistent'][$_SERVER['PHP_SELF']]) != 0) {
if (!empty($_SESSION['persistent']) && is_array($_SESSION['persistent'][$_SERVER['PHP_SELF']]) && @sizeof($_SESSION['persistent'][$_SERVER['PHP_SELF']]) != 0) {
foreach ($_SESSION['persistent'][$_SERVER['PHP_SELF']] as $key => $value) {
if ($key != 'XID' && $key != 'ACT' && $key != 'RET') {
if ($array && !is_array($array)) {