[BUGFIX] Fixed router for controller and ressources not matching /something?

This commit is contained in:
Simon Sessingø
2015-10-14 19:55:05 +02:00
parent aec1f5f10c
commit 93d8c26416
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -16,9 +16,8 @@ class RouterController extends RouterEntry {
}
public function matchRoute($requestMethod, $url) {
$url = parse_url($url);
$url = $url['path'];
$url = rtrim($url['path'], '/') . '/';
if(strtolower($url) == strtolower($this->url) || stripos($url, $this->url) === 0) {
+1 -1
View File
@@ -53,7 +53,7 @@ class RouterRessource extends RouterEntry {
public function matchRoute($requestMethod, $url) {
$url = parse_url($url);
$url = $url['path'];
$url = rtrim($url['path'], '/') . '/';
if(strtolower($url) == strtolower($this->url) || stripos($url, $this->url) === 0) {
$url = rtrim($url, '/');