Browse Source

Properly check for dd() function in stack frames.

ADmad 9 years ago
parent
commit
c8eb2e1609
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/basics.php

+ 4 - 1
src/basics.php

@@ -52,7 +52,10 @@ if (!function_exists('debug')) {
         $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 = [];