File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,19 +29,20 @@ public function find(array $route) {
2929 $ matchedRoute = $ config [$ method ][$ routeName ];
3030
3131 // This allows POST to inherit from GET if "inherit" : "GET" is set (or vice versa)
32- if (isset ($ matchedRoute ['inherit ' ]) && isset ($ config [$ matchedRoute-> inherit ][$ routeName ])) {
32+ if (isset ($ matchedRoute ['inherit ' ]) && isset ($ config [$ matchedRoute[ ' inherit ' ] ][$ routeName ])) {
3333 $ inheritMethod = $ matchedRoute ['inherit ' ];
34- $ matchedRoute = array_merge ($ config [$ inheritMethod [$ routeName] ], $ matchedRoute );
34+ $ matchedRoute = array_merge ($ config [$ inheritMethod] [$ routeName ], $ matchedRoute );
3535 }
3636 }
37+ else return false ;
3738
3839 return $ this ->getRoute ($ matchedRoute , $ route );
3940 }
4041
4142 private function getRouteDir ($ moduleName ) {
4243 $ files = glob ($ this ->moduleDir . '/* ' );
4344 $ match = preg_grep ('/ ' . $ this ->moduleDir . '\/ ' . $ moduleName . '/i ' , $ files );
44- return $ match [0 ] ?? false ;
45+ return array_values ( $ match) [0 ] ?? false ;
4546 }
4647
4748 public function getConfig ($ route ) {
You can’t perform that action at this time.
0 commit comments