File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function find(array $route) {
2121 $ method = $ this ->request ->server ('REQUEST_METHOD ' );
2222
2323
24- if (! isset ($ route [0 ]) || ( isset ($ route [ 0 ]) && $ route [0 ] == '' )) $ routeName = isset ($ config ->$ method ->defaultRoute ) ? $ config ->$ method ->defaultRoute : 'index ' ;
24+ if (empty ($ route [0 ]) || ! isset ($ config -> $ method ->{ $ route [0 ]} )) $ routeName = isset ($ config ->$ method ->defaultRoute ) ? $ config ->$ method ->defaultRoute : 'index ' ;
2525 else $ routeName = array_shift ($ route );
2626
2727 if (isset ($ config ->$ method ->$ routeName )) {
@@ -33,8 +33,10 @@ public function find(array $route) {
3333 $ matchedRoute = (object ) array_merge ((array )$ matchedRoute , (array )$ config ->$ inheritMethod ->$ routeName );
3434 }
3535
36- return $ this ->getRoute ($ matchedRoute , $ route );
3736 }
37+
38+ return $ this ->getRoute ($ matchedRoute , $ route );
39+
3840 }
3941
4042 private function getRouteDir ($ moduleName ) {
You can’t perform that action at this time.
0 commit comments