Skip to content

Commit

Permalink
Properly check for dd() function in stack frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jan 7, 2017
1 parent e8044ff commit c8eb2e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/basics.php
Expand Up @@ -52,7 +52,10 @@ function debug($var, $showHtml = null, $showFrom = true)
$lineInfo = '';
if ($showFrom) {
$trace = Debugger::trace(['start' => 1, 'depth' => 3, 'format' => 'array']);
if (count($trace) > 1) {
if (count($trace) > 1
&& $trace[1]['function'] === 'dd'
&& !isset($trace[1]['object'])
) {
array_shift($trace);
}
$search = [];
Expand Down

0 comments on commit c8eb2e1

Please sign in to comment.