Skip to content
Permalink
Browse files

Properly check for dd() function in stack frames.

  • Loading branch information...
ADmad committed Jan 7, 2017
1 parent e8044ff commit c8eb2e1609dd6eef8cd6b1c1aabcbf8870aed0fd
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/basics.php
@@ -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 = [];

0 comments on commit c8eb2e1

Please sign in to comment.
You can’t perform that action at this time.