mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-36466 cache: improved handling of exceptions during initialisation.
This commit is contained in:
parent
f42c34a38a
commit
7383a7e2a0
4 changed files with 127 additions and 13 deletions
|
@ -1444,7 +1444,12 @@ border-color:black; background-color:#ffffee; border-style:solid; border-radius:
|
|||
width: 80%; -moz-border-radius: 20px; padding: 15px">
|
||||
' . $message . '
|
||||
</div>';
|
||||
if (!empty($CFG->debug) && $CFG->debug >= DEBUG_DEVELOPER) {
|
||||
// Check whether debug is set.
|
||||
$debug = (!empty($CFG->debug) && $CFG->debug >= DEBUG_DEVELOPER);
|
||||
// Also check we have it set in the config file. This occurs if the method to read the config table from the
|
||||
// database fails, reading from the config table is the first database interaction we have.
|
||||
$debug = $debug || (!empty($CFG->config_php_settings['debug']) && $CFG->config_php_settings['debug'] >= DEBUG_DEVELOPER );
|
||||
if ($debug) {
|
||||
if (!empty($debuginfo)) {
|
||||
$debuginfo = s($debuginfo); // removes all nasty JS
|
||||
$debuginfo = str_replace("\n", '<br />', $debuginfo); // keep newlines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue