mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
fixing a warning when variable is not an object
This commit is contained in:
parent
55a814399f
commit
8397874d1b
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue