From d87234ced53eef3560e0435efad6142402c8e18b Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 28 Oct 2009 11:16:57 +0000 Subject: [PATCH] auth/mnet - MDL-16872 Fix incorrect use of clone() on arrays Thanks to Nigel McNie for the patch --- auth/mnet/auth.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index cf83619313..052fdf5204 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -933,7 +933,7 @@ class auth_plugin_mnet extends auth_plugin_base { // 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); @@ -953,7 +953,7 @@ class auth_plugin_mnet extends auth_plugin_base { session_name('MoodleSession'.$CFG->sessioncookie); session_id($sessidcache); session_start(); - $_SESSION = clone($sesscache); + $_SESSION = $sesscache; session_write_close(); } } @@ -1159,7 +1159,7 @@ class auth_plugin_mnet extends auth_plugin_base { $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); @@ -1178,7 +1178,7 @@ class auth_plugin_mnet extends auth_plugin_base { session_name('MoodleSession'.$CFG->sessioncookie); session_id($sessidcache); session_start(); - $_SESSION = clone($sesscache); + $_SESSION = $sesscache; session_write_close(); $end = ob_end_clean(); @@ -1201,7 +1201,7 @@ class auth_plugin_mnet extends auth_plugin_base { $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); @@ -1220,7 +1220,7 @@ class auth_plugin_mnet extends auth_plugin_base { session_name('MoodleSession'.$CFG->sessioncookie); session_id($sessidcache); session_start(); - $_SESSION = clone($sesscache); + $_SESSION = $sesscache; $end = ob_end_clean(); return true; -- 2.39.5