File tree Expand file tree Collapse file tree
src/Bridges/ApplicationTracy Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111use Nette \Application \UI \Presenter ;
1212use Nette \Routing ;
1313use Tracy ;
14+ use function is_string ;
1415
1516
1617/**
@@ -123,6 +124,9 @@ private function findSource(): \ReflectionClass|\ReflectionMethod|string|null
123124 {
124125 $ params = $ this ->matched ;
125126 $ presenter = $ params ['presenter ' ] ?? '' ;
127+ if (!is_string ($ presenter )) {
128+ return null ;
129+ }
126130 try {
127131 $ class = $ this ->presenterFactory ->getPresenterClass ($ presenter );
128132 } catch (Nette \Application \InvalidPresenterException ) {
@@ -134,9 +138,10 @@ private function findSource(): \ReflectionClass|\ReflectionMethod|string|null
134138
135139 if (is_a ($ class , Nette \Application \UI \Presenter::class, allow_string: true )) {
136140 $ rc = $ class ::getReflection ();
137- if (isset ($ params [Presenter::SignalKey])) {
141+ if (isset ($ params [Presenter::SignalKey]) && is_string ( $ params [Presenter::SignalKey]) ) {
138142 return $ rc ->getSignalMethod ($ params [Presenter::SignalKey]);
139143 } elseif (isset ($ params [Presenter::ActionKey])
144+ && is_string ($ params [Presenter::ActionKey])
140145 && ($ method = $ rc ->getActionRenderMethod ($ params [Presenter::ActionKey]))
141146 ) {
142147 return $ method ;
You can’t perform that action at this time.
0 commit comments