diff --git a/src/Bridges/ApplicationTracy/RoutingPanel.php b/src/Bridges/ApplicationTracy/RoutingPanel.php index 463fb50a7..3305c6cfb 100644 --- a/src/Bridges/ApplicationTracy/RoutingPanel.php +++ b/src/Bridges/ApplicationTracy/RoutingPanel.php @@ -116,13 +116,16 @@ private function analyse(Routing\RouteList $router, ?Nette\Http\IRequest $httpRe } - private function findSource(): \ReflectionClass|\ReflectionMethod|null + private function findSource(): \ReflectionClass|\ReflectionMethod|string|null { $params = $this->matched; $presenter = $params['presenter'] ?? ''; try { $class = $this->presenterFactory->getPresenterClass($presenter); } catch (Nette\Application\InvalidPresenterException) { + if ($this->presenterFactory instanceof Nette\Application\PresenterFactory) { + return $this->presenterFactory->formatPresenterClass($presenter); + } return null; } diff --git a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml index 2c62aada4..6d499b185 100644 --- a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml +++ b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml @@ -100,8 +100,10 @@ use Tracy\Helpers;

getBaseUrl()) ?>&', '?'], Helpers::escapeHtml($url->getRelativeUrl())) ?>

- -

getName() : $source->getDeclaringClass()->getName() . '::' . $source->getName() . '()' ?>

+ +

(class not found)

+ +

getName() : $source->getDeclaringClass()->getName() . '::' . $source->getName() . '()' ?>