Skip to content

Commit

Permalink
Merge branch 'MDL-50271-28' of git://github.com/jleyva/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_28_STABLE
  • Loading branch information
danpoltawski committed May 26, 2015
2 parents 8ff5016 + caf3cb7 commit d88c343
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pagelib.php
Expand Up @@ -1828,6 +1828,11 @@ protected function ensure_categories_loaded() {
* @throws coding_exception
*/
protected function ensure_theme_not_set() {
// This is explicitly allowed for webservices though which may process many course contexts in a single request.
if (WS_SERVER) {
return;
}

if (!is_null($this->_theme)) {
throw new coding_exception('The theme has already been set up for this page ready for output. ' .
'Therefore, you can no longer change the theme, or anything that might affect what ' .
Expand Down

0 comments on commit d88c343

Please sign in to comment.