mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-63321 block: Fix warning in Calendar month block after MDL-60587
This commit is contained in:
parent
01389839df
commit
e0d05a355a
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ class block_calendar_month extends block_base {
|
|||
$this->content->footer = '';
|
||||
|
||||
$courseid = $this->page->course->id;
|
||||
$categoryid = ($this->page->context->contextlevel === CONTEXT_COURSECAT) ? $this->page->category->id : null;
|
||||
$categoryid = ($this->page->context->contextlevel === CONTEXT_COURSECAT && !empty($this->page->category)) ?
|
||||
$this->page->category->id : null;
|
||||
$calendar = \calendar_information::create(time(), $courseid, $categoryid);
|
||||
list($data, $template) = calendar_get_view($calendar, 'mini', isloggedin(), isloggedin());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue