Skip to content

Commit

Permalink
Make location displayed by dd() identical to that by debug().
Browse files Browse the repository at this point in the history
Refs #9989
  • Loading branch information
ADmad committed Jan 7, 2017
1 parent d4b1f92 commit 4cd0e96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/basics.php
Expand Up @@ -51,7 +51,10 @@ function debug($var, $showHtml = null, $showFrom = true)
$line = '';
$lineInfo = '';
if ($showFrom) {
$trace = Debugger::trace(['start' => 1, 'depth' => 2, 'format' => 'array']);
$trace = Debugger::trace(['start' => 1, 'depth' => 3, 'format' => 'array']);
if (count($trace) > 1) {
array_shift($trace);
}
$search = [];
if (defined('ROOT')) {
$search = [ROOT];
Expand Down Expand Up @@ -171,8 +174,6 @@ function dd($var, $showHtml = null)
}

debug($var, $showHtml, false);
$backtrace = debug_backtrace(false, 1);
pr('dd-location: ' . $backtrace[0]['file'] . ':' . $backtrace[0]['line']);
die(1);
}
}

0 comments on commit 4cd0e96

Please sign in to comment.