Skip to content

Commit 1bb2b2c

Browse files
Ignore arguments and limit to 3 stack frames
1 parent 34a8070 commit 1bb2b2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Runner/ErrorHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
namespace PHPUnit\Runner;
1111

12+
use const DEBUG_BACKTRACE_IGNORE_ARGS;
1213
use const E_COMPILE_ERROR;
1314
use const E_COMPILE_WARNING;
1415
use const E_CORE_ERROR;
@@ -73,7 +74,7 @@ public function __invoke(int $errorNumber, string $errorString, string $errorFil
7374
return false;
7475
}
7576

76-
$trace = debug_backtrace(0);
77+
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
7778
$test = Event\Code\TestMethodBuilder::fromCallStack();
7879

7980
$ignoredByBaseline = $this->ignoredByBaseline($errorFile, $errorLine, $errorString);

0 commit comments

Comments
 (0)