Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

auth/mnet - MDL-16872 Fix incorrect use of clone() on arrays

Thanks to Nigel McNie for the patch
  • Loading branch information...
commit 9ec826a37a133af00f550ab2a06d9abfa0f90359 1 parent 656925c
@danpoltawski danpoltawski authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 auth/mnet/auth.php
View
16 auth/mnet/auth.php
@@ -950,7 +950,7 @@ function keepalive_server($array) {
// There is no way to capture what the custom session handler
// is and then reset it on each pass - I checked that out
// already.
- $sesscache = clone($_SESSION);
+ $sesscache = $_SESSION;
$sessidcache = session_id();
session_write_close();
unset($_SESSION);
@@ -970,7 +970,7 @@ function keepalive_server($array) {
session_name('MoodleSession'.$CFG->sessioncookie);
session_id($sessidcache);
session_start();
- $_SESSION = clone($sesscache);
+ $_SESSION = $sesscache;
session_write_close();
}
}
@@ -1140,7 +1140,7 @@ function kill_children($username, $useragent) {
$uc = ini_get('session.use_cookies');
ini_set('session.use_cookies', false);
- $sesscache = clone($_SESSION);
+ $sesscache = $_SESSION;
$sessidcache = session_id();
session_write_close();
unset($_SESSION);
@@ -1159,7 +1159,7 @@ function kill_children($username, $useragent) {
session_name('MoodleSession'.$CFG->sessioncookie);
session_id($sessidcache);
session_start();
- $_SESSION = clone($sesscache);
+ $_SESSION = $sesscache;
session_write_close();
$end = ob_end_clean();
@@ -1186,7 +1186,7 @@ function kill_child($username, $useragent) {
$uc = ini_get('session.use_cookies');
ini_set('session.use_cookies', false);
- $sesscache = clone($_SESSION);
+ $sesscache = $_SESSION;
$sessidcache = session_id();
session_write_close();
unset($_SESSION);
@@ -1205,7 +1205,7 @@ function kill_child($username, $useragent) {
session_name('MoodleSession'.$CFG->sessioncookie);
session_id($sessidcache);
session_start();
- $_SESSION = clone($sesscache);
+ $_SESSION = $sesscache;
session_write_close();
$end = ob_end_clean();
@@ -1228,7 +1228,7 @@ function end_local_sessions(&$sessionArray) {
$uc = ini_get('session.use_cookies');
ini_set('session.use_cookies', false);
- $sesscache = clone($_SESSION);
+ $sesscache = $_SESSION;
$sessidcache = session_id();
session_write_close();
unset($_SESSION);
@@ -1247,7 +1247,7 @@ function end_local_sessions(&$sessionArray) {
session_name('MoodleSession'.$CFG->sessioncookie);
session_id($sessidcache);
session_start();
- $_SESSION = clone($sesscache);
+ $_SESSION = $sesscache;
$end = ob_end_clean();
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.