[BUGFIX] Fixed only match group route if prefix is set

This commit is contained in:
Simon Sessingø
2016-04-09 10:01:02 +02:00
parent 6cef099110
commit 491e920cfc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ class RouterBase {
$group = $route;
// Load middleware on group if route matches
if($route->matchRoute($this->request)) {
if($route->getPrefix() !== null && $route->matchRoute($this->request)) {
$route->loadMiddleware($this->request);
}
+1 -1
View File
@@ -98,7 +98,7 @@ class SimpleRouter {
* Adds get + post route
*
* @param string $url
* @param function $callback
* @param callable $callback
* @param array|null $settings
* @return RouterRoute
*/