Merge branch 'MDL-53717_master' of git://github.com/markn86/moodle

This commit is contained in:
Dan Poltawski 2016-04-25 22:20:31 +01:00
commit 7064aaa11e

View File

@ -1062,7 +1062,13 @@ class core_renderer extends renderer_base {
}
$footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);
$this->page->requires->js_call_amd('core/notification', 'init', array($PAGE->context->id, \core\notification::fetch_as_array($this)));
// Only show notifications when we have a $PAGE context id.
if (!empty($PAGE->context->id)) {
$this->page->requires->js_call_amd('core/notification', 'init', array(
$PAGE->context->id,
\core\notification::fetch_as_array($this)
));
}
$footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);
$this->page->set_state(moodle_page::STATE_DONE);