We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 556322f commit 13f5ab3Copy full SHA for 13f5ab3
src/Bridges/ApplicationDI/LatteExtension.php
@@ -103,10 +103,11 @@ public function beforeCompile()
103
public static function initLattePanel(ApplicationLatte\TemplateFactory $factory, Tracy\Bar $bar, bool $all = false)
104
{
105
$factory->onCreate[] = function (ApplicationLatte\Template $template) use ($bar, $all) {
106
- if ($all || $template->control instanceof Nette\Application\UI\Presenter) {
+ $control = $template->control ?? null;
107
+ if ($all || $control instanceof Nette\Application\UI\Presenter) {
108
$bar->addPanel(new Latte\Bridges\Tracy\LattePanel(
109
$template->getLatte(),
- $all ? (new \ReflectionObject($template->control))->getShortName() : ''
110
+ $all && $control ? (new \ReflectionObject($control))->getShortName() : ''
111
));
112
}
113
};
0 commit comments