auth/mnet - MDL-16872 Fix incorrect use of clone() on arrays
authorDan Poltawski <dan.poltawski@lancaster.ac.uk>
Wed, 28 Oct 2009 11:16:57 +0000 (11:16 +0000)
committerDan Poltawski <dan.poltawski@lancaster.ac.uk>
Wed, 28 Oct 2009 11:16:57 +0000 (11:16 +0000)
Thanks to Nigel McNie for the patch

auth/mnet/auth.php

index cf83619..052fdf5 100644 (file)
@@ -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;