File tree 1 file changed +3
-2
lines changed
src/Bridges/ApplicationDI
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,11 @@ public function beforeCompile()
103
103
public static function initLattePanel (ApplicationLatte \TemplateFactory $ factory , Tracy \Bar $ bar , bool $ all = false )
104
104
{
105
105
$ factory ->onCreate [] = function (ApplicationLatte \Template $ template ) use ($ bar , $ all ) {
106
- if ($ all || $ template ->control instanceof Nette \Application \UI \Presenter) {
106
+ $ control = $ template ->control ?? null ;
107
+ if ($ all || $ control instanceof Nette \Application \UI \Presenter) {
107
108
$ bar ->addPanel (new Latte \Bridges \Tracy \LattePanel (
108
109
$ template ->getLatte (),
109
- $ all ? (new \ReflectionObject ($ template -> control ))->getShortName () : ''
110
+ $ all && $ control ? (new \ReflectionObject ($ control ))->getShortName () : ''
110
111
));
111
112
}
112
113
};
You can’t perform that action at this time.
0 commit comments