Functions: Updates for PHP 8.1
This commit is contained in:
parent
196125952b
commit
adfdb7bae5
|
|
@ -2118,14 +2118,14 @@ function number_pad($number,$n) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'exists':
|
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;
|
break;
|
||||||
case 'load':
|
case 'load':
|
||||||
// $array is expected to be the name of the array to create containing the key / value pairs
|
// $array is expected to be the name of the array to create containing the key / value pairs
|
||||||
if ($array && !is_array($array)) {
|
if ($array && !is_array($array)) {
|
||||||
global $$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) {
|
foreach ($_SESSION['persistent'][$_SERVER['PHP_SELF']] as $key => $value) {
|
||||||
if ($key != 'XID' && $key != 'ACT' && $key != 'RET') {
|
if ($key != 'XID' && $key != 'ACT' && $key != 'RET') {
|
||||||
if ($array && !is_array($array)) {
|
if ($array && !is_array($array)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue