mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-58035 lib: log when the expected theme cannot be initialised
This commit is contained in:
parent
9ec952f237
commit
ea049ee618
1 changed files with 5 additions and 0 deletions
|
@ -499,10 +499,15 @@ class theme_config {
|
||||||
throw new coding_exception('Default theme '.theme_config::DEFAULT_THEME.' not available or broken!');
|
throw new coding_exception('Default theme '.theme_config::DEFAULT_THEME.' not available or broken!');
|
||||||
|
|
||||||
} else if ($config = theme_config::find_theme_config($CFG->theme, $settings)) {
|
} else if ($config = theme_config::find_theme_config($CFG->theme, $settings)) {
|
||||||
|
debugging('This page should be using theme ' . $themename .
|
||||||
|
' which cannot be initialised. Falling back to the site theme ' . $CFG->theme, DEBUG_NORMAL);
|
||||||
return new theme_config($config);
|
return new theme_config($config);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// bad luck, the requested theme has some problems - admin see details in theme config
|
// bad luck, the requested theme has some problems - admin see details in theme config
|
||||||
|
debugging('This page should be using theme ' . $themename .
|
||||||
|
' which cannot be initialised. Nor can the site theme ' . $CFG->theme .
|
||||||
|
'. Falling back to ' . theme_config::DEFAULT_THEME, DEBUG_NORMAL);
|
||||||
return new theme_config(theme_config::find_theme_config(theme_config::DEFAULT_THEME, $settings));
|
return new theme_config(theme_config::find_theme_config(theme_config::DEFAULT_THEME, $settings));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue