MDL-58936 core: ensure 'page->context' is not null
commit004dcb4f585a2d7109b8c52a3b20332e31caec81
authorMark Nelson <markn@moodle.com>
Mon, 15 May 2017 04:20:15 +0000 (15 12:20 +0800)
committerMark Nelson <markn@moodle.com>
Mon, 15 May 2017 04:29:15 +0000 (15 12:29 +0800)
treed30659b768d98013db513f8ef18bb9b8b7167a4b
parent17fb1d84a261942af623cfaa12febd35f885a367
MDL-58936 core: ensure 'page->context' is not null

When using $page->context it calls magic_get_context() in lib/pagelib.php.
This method sets the context to context_system::instance() if it is currently
null and returns that as the context. However, when installing a new site
context_system::instance() also returns null.
lib/outputrequirementslib.php