]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14965: Pass-by-reference call broke install on php5
authorsam_marshall <sam_marshall>
Fri, 23 May 2008 10:36:28 +0000 (10:36 +0000)
committersam_marshall <sam_marshall>
Fri, 23 May 2008 10:36:28 +0000 (10:36 +0000)
lib/accesslib.php

index adc6695eb736b78a1efe3f8839a220306965317a..6a37d486d381e4df6ceb0dfff8da8b49e377d047 100755 (executable)
@@ -1265,7 +1265,8 @@ function load_subcontext($userid, $context, &$accessdata) {
         // If we ever see stuff nested further this needs to
         // change to do 1 query over the exploded path to
         // find out which one is the course
-        $targetid    = array_pop(explode('/',get_course_from_path($context->path)));
+        $courses = explode('/',get_course_from_path($context->path));
+        $targetid = array_pop($courses);
         $context = get_context_instance_by_id($targetid);
                                  
     }