[BUGFIX] Fixed support for urls like /path/{param}/path

This commit is contained in:
Simon Sessingø
2015-11-20 07:17:49 +01:00
parent 19dc295199
commit b930c06683
+5 -2
View File
@@ -42,12 +42,15 @@ class RouterRoute extends RouterEntry {
$url = parse_url($request->getUri());
$url = $url['path'];
$route = $this->url;
$route = rtrim($this->url, '/') . '/';
$routeMatch = preg_replace('/\/{0,1}'.self::PARAMETERS_REGEX_MATCH.'\/{0,1}/is', '', $route);
$tmp = explode('/', $route);
$tmp2 = explode('/', $url);
// Check if url parameter count matches
if(stripos($url, $routeMatch) === 0) {
if(stripos($url, $routeMatch) === 0 || count($tmp) === count($tmp2)) {
$matches = true;