[BUGFIX] Fixed issue #83

- Added more tests.
This commit is contained in:
Simon Sessingø
2016-04-09 07:51:03 +02:00
parent fc4fd0edf1
commit 457dbc5710
4 changed files with 77 additions and 38 deletions
+6 -2
View File
@@ -69,12 +69,12 @@ class RouterBase {
$newPrefixes = $prefixes;
if($route->getPrefix()) {
array_push($newPrefixes, rtrim($route->getPrefix(), '/'));
array_push($newPrefixes, trim($route->getPrefix(), '/'));
}
if(!($route instanceof RouterGroup)) {
if(is_array($newPrefixes) && count($newPrefixes) && $backStack) {
$route->setUrl( join('/', $newPrefixes) . $route->getUrl() );
$route->setUrl( '/' . join('/', $newPrefixes) . $route->getUrl() );
}
$group = null;
@@ -455,4 +455,8 @@ class RouterBase {
return self::$instance;
}
public static function reset() {
self::$instance = null;
}
}