Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

debugging(): use trigger_error() when !display_errors -- now you can …

…debug stuff without breaking HTTP headers, HTML and JS
  • Loading branch information...
commit c7533061eff0058937b20531e07e40676d429786 1 parent d5afb8c
martinlanghoff authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/weblib.php
View
8 lib/weblib.php
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.