mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-14965: Pass-by-reference call broke install on php5
This commit is contained in:
parent
2d80e3882e
commit
c2f10673b2
@ -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);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user