mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-65509 output: use translated strings when showing a fatal error
This commit is contained in:
parent
dc468ac523
commit
a875f3f513
@ -49,6 +49,7 @@ $string['nomodules'] = 'No modules found!!';
|
||||
$string['nopageclass'] = 'Imported {$a} but found no page classes';
|
||||
$string['noreports'] = 'No reports accessible';
|
||||
$string['notables'] = 'No tables!';
|
||||
$string['outputbuffer'] = 'Output buffer';
|
||||
$string['phpvaroff'] = 'The PHP server variable \'{$a->name}\' should be Off - {$a->link}';
|
||||
$string['phpvaron'] = 'The PHP server variable \'{$a->name}\' is not turned On - {$a->link}';
|
||||
$string['sessionmissing'] = '{$a} object missing from session';
|
||||
|
@ -2809,16 +2809,20 @@ EOD;
|
||||
$output .= $this->box($message, 'errorbox alert alert-danger', null, array('data-rel' => 'fatalerror'));
|
||||
|
||||
if ($CFG->debugdeveloper) {
|
||||
$labelsep = get_string('labelsep', 'langconfig');
|
||||
if (!empty($debuginfo)) {
|
||||
$debuginfo = s($debuginfo); // removes all nasty JS
|
||||
$debuginfo = str_replace("\n", '<br />', $debuginfo); // keep newlines
|
||||
$output .= $this->notification('<strong>Debug info:</strong> '.$debuginfo, 'notifytiny');
|
||||
$label = get_string('debuginfo', 'debug') . $labelsep;
|
||||
$output .= $this->notification("<strong>$label</strong> " . $debuginfo, 'notifytiny');
|
||||
}
|
||||
if (!empty($backtrace)) {
|
||||
$output .= $this->notification('<strong>Stack trace:</strong> '.format_backtrace($backtrace), 'notifytiny');
|
||||
$label = get_string('stacktrace', 'debug') . $labelsep;
|
||||
$output .= $this->notification("<strong>$label</strong> " . format_backtrace($backtrace), 'notifytiny');
|
||||
}
|
||||
if ($obbuffer !== '' ) {
|
||||
$output .= $this->notification('<strong>Output buffer:</strong> '.s($obbuffer), 'notifytiny');
|
||||
$label = get_string('outputbuffer', 'debug') . $labelsep;
|
||||
$output .= $this->notification("<strong>$label</strong> " . s($obbuffer), 'notifytiny');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user