mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
fixing a warning when variable is not an object
This commit is contained in:
parent
55a814399f
commit
8397874d1b
@ -1315,7 +1315,9 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
|
||||
foreach($groupcourses as $courseid) {
|
||||
|
||||
if (!isset($courseeventsfrom[$courseid]->context)) { // SHOULD be set MDL-11221
|
||||
$courseeventsfrom[$courseid]->context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
if (is_object($courseeventsfrom[$courseid])) {
|
||||
$courseeventsfrom[$courseid]->context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
}
|
||||
}
|
||||
|
||||
// If the user is an editing teacher in there,
|
||||
|
Loading…
x
Reference in New Issue
Block a user