diff --git a/src/Bridges/Nette/Bridge.php b/src/Bridges/Nette/Bridge.php index ccb2f1c1c..b79624531 100644 --- a/src/Bridges/Nette/Bridge.php +++ b/src/Bridges/Nette/Bridge.php @@ -104,7 +104,10 @@ public static function renderMemberAccessException(?\Throwable $e): ?array return null; } - $loc = $e->getTrace()[$e instanceof Nette\MemberAccessException ? 1 : 0]; + $trace = $e->getTrace(); + do { + $loc = array_shift($trace); + } while (($loc['class'] ?? null) === Nette\Utils\ObjectHelpers::class); if (!isset($loc['file'])) { return null; }