diff --git a/framework/router.class.php b/framework/router.class.php index 30b6100660..50bb2596b7 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1306,13 +1306,25 @@ class router $trace = debug_backtrace(); extract($trace[0]); extract($trace[1]); - $log .= ", last called by $file on $line through function $function."; + $log .= ", last called by $file on line $line through function $function.\n"; error_log($log); /* If exit, output the error. */ if($exit) { - if($this->config->debug) die("$log"); + if($this->config->debug) + { + if(PHP_SAPI != 'cli') + { + $htmlError = ""; + $htmlError .= "$log"; + die($htmlError); + } + else + { + die($log); + } + } die(); } }