From c2f10673b2ce31cde04f738ee68898bcf5145d58 Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Fri, 23 May 2008 10:36:28 +0000 Subject: [PATCH] MDL-14965: Pass-by-reference call broke install on php5 --- lib/accesslib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index adc6695eb73..6a37d486d38 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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); }