mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
debugging(): use trigger_error() when !display_errors -- now you can debug stuff without breaking HTTP headers, HTML and JS
This commit is contained in:
parent
d5afb8cb59
commit
c7533061ef
@ -5478,7 +5478,13 @@ function debugging($message='', $level=DEBUG_NORMAL) {
|
||||
|
||||
if ($CFG->debug >= $level) {
|
||||
if ($message) {
|
||||
notify($message, 'notifytiny');
|
||||
if (ini_get('display_errors') == true) {
|
||||
notify($message, 'notifytiny');
|
||||
} else {
|
||||
// moodle debug levels constants map well to PHP's own
|
||||
trigger_error($message, $level);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user