X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fsession-functions.php;h=735f634194ce190711377aab719df80ceab4a7a5;hb=290937aff2aca93361a8bdb02a7c8ca5f16897fa;hp=ce329769dce456e9cbb588edd375e40fe40398bd;hpb=86d7b339631307afe1ba16ceff8ce760c1523be1;p=mailer.git diff --git a/inc/session-functions.php b/inc/session-functions.php index ce329769dc..735f634194 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -1,7 +1,7 @@ = '5.3.1') { + // session_unregister() is deprecated as of 5.3.1 + return true; + } else { + // PHP version < 5.3.1 + return session_unregister($var); + } } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) { // Set session //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value); $GLOBALS['_SESSION'][$var] = $value; - return session_register($var); + if (phpversion() >= '5.3.1') { + // session_unregister() is deprecated as of 5.3.1 + return true; + } else { + // PHP version < 5.3.1 + return session_register($var); + } } elseif (!empty($value)) { // Update session //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UPDATE:' . $var . '=' . $value); @@ -90,6 +103,7 @@ function getSession ($var) { } // END - if // Return the value + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $var . '=' . $value); return $value; } @@ -108,7 +122,6 @@ function destroyAdminSession ($destroy = true) { setSession('admin_login', ''); setSession('admin_md5' , ''); setSession('admin_last' , ''); - setSession('admin_to' , ''); // Destroy session and return status if ($destroy) {