From: tjhunt Date: Thu, 22 Mar 2007 16:43:48 +0000 (+0000) Subject: Make debugging more helpful by printing a full stack trace. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6fd3300925fbc11090862d25b975de1851b42e5e;p=moodle.git Make debugging more helpful by printing a full stack trace. --- diff --git a/lib/weblib.php b/lib/weblib.php index 2e3451afbc..70ffc7280a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5756,12 +5756,20 @@ function debugging($message='', $level=DEBUG_NORMAL) { if ($CFG->debug >= $level) { if ($message) { - $caller = debug_backtrace(); - $caller = $caller[0]; - $from = " in $caller[file] on line $caller[line]"; - if (isset($caller['function'])) { - $from .= " in $caller[function]()"; + $callers = debug_backtrace(); + $from = ''; if (!isset($CFG->debugdisplay)) { $CFG->debugdisplay = ini_get('display_errors'); }