Do not display meaningless debug information

This commit is contained in:
Kijin Sung 2016-02-13 10:40:40 +09:00
parent 12673a29c6
commit e04efdd03e
3 changed files with 13 additions and 2 deletions

View file

@ -101,6 +101,10 @@ class Debug
// Get the backtrace.
$backtrace_args = defined('\DEBUG_BACKTRACE_IGNORE_ARGS') ? \DEBUG_BACKTRACE_IGNORE_ARGS : 0;
$backtrace = debug_backtrace($backtrace_args);
if (count($backtrace) > 1 && $backtrace[1]['function'] === 'debugPrint' && !$backtrace[1]['class'])
{
array_shift($backtrace);
}
// Create a log entry.
$entry = (object)array(