diff --git a/src/Tracy/BlueScreen/assets/section-stack-exception.phtml b/src/Tracy/BlueScreen/assets/section-stack-exception.phtml index 9e9bc66de..7f578cc73 100644 --- a/src/Tracy/BlueScreen/assets/section-stack-exception.phtml +++ b/src/Tracy/BlueScreen/assets/section-stack-exception.phtml @@ -11,10 +11,16 @@ namespace Tracy; */ $stack = $ex->getTrace(); +if (in_array($stack[0]['class'] ?? null, [DevelopmentStrategy::class, ProductionStrategy::class], true)) { + array_shift($stack); +} +if (($stack[0]['class'] ?? null) === Debugger::class && in_array($stack[0]['function'], ['shutdownHandler', 'errorHandler'], true)) { + array_shift($stack); +} + $expanded = null; if ( - (!$ex instanceof \ErrorException - || in_array($ex->getSeverity(), [E_USER_NOTICE, E_USER_WARNING, E_USER_DEPRECATED], true)) + (!$ex instanceof \ErrorException || in_array($ex->getSeverity(), [E_USER_NOTICE, E_USER_WARNING, E_USER_DEPRECATED], true)) && $this->isCollapsed($ex->getFile()) ) { foreach ($stack as $key => $row) { @@ -25,12 +31,6 @@ if ( } } -if (in_array($stack[0]['class'] ?? null, [DevelopmentStrategy::class, ProductionStrategy::class], true)) { - array_shift($stack); -} -if (($stack[0]['class'] ?? null) === Debugger::class && in_array($stack[0]['function'], ['shutdownHandler', 'errorHandler'], true)) { - array_shift($stack); -} $file = $ex->getFile(); $line = $ex->getLine();