MDL-44299 resolve collision with session_gc() in PHP 5.6
This commit is contained in:
+15
-11
@@ -105,17 +105,21 @@ function session_kill_user($userid) {
|
||||
\core\session\manager::kill_user_sessions($userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Session garbage collection
|
||||
* - verify timeout for all users
|
||||
* - kill sessions of all deleted users
|
||||
* - kill sessions of users with disabled plugins or 'nologin' plugin
|
||||
*
|
||||
* @deprecated since 2.6
|
||||
*/
|
||||
function session_gc() {
|
||||
debugging('session_gc() is deprecated, use \core\session\manager::gc() instead', DEBUG_DEVELOPER);
|
||||
\core\session\manager::gc();
|
||||
// PHP 5.6 includes session_gc(), we cannot define it any more.
|
||||
if (!function_exists('session_gc')) {
|
||||
/**
|
||||
* Session garbage collection
|
||||
* - verify timeout for all users
|
||||
* - kill sessions of all deleted users
|
||||
* - kill sessions of users with disabled plugins or 'nologin' plugin
|
||||
*
|
||||
* @deprecated since 2.6
|
||||
*/
|
||||
function session_gc()
|
||||
{
|
||||
debugging('session_gc() is deprecated, use \core\session\manager::gc() instead', DEBUG_DEVELOPER);
|
||||
\core\session\manager::gc();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user