fix: stacktrace with nested with calls

This commit is contained in:
nuno maduro
2026-04-10 17:25:05 +01:00
parent bdf60cea91
commit 729f18a152
5 changed files with 349 additions and 4 deletions

View File

@ -23,7 +23,9 @@ final class Backtrace
$current = null;
foreach (debug_backtrace(self::BACKTRACE_OPTIONS) as $trace) {
assert(array_key_exists(self::FILE, $trace));
if (array_key_exists(self::FILE, $trace) === false) {
break;
}
$traceFile = str_replace(DIRECTORY_SEPARATOR, '/', $trace[self::FILE]);