mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed regular expression matching after last release.
This commit is contained in:
@@ -49,7 +49,7 @@ class RouterRoute extends RouterEntry {
|
||||
// Check if url parameter count matches
|
||||
if(stripos($url, $routeMatch) === 0) {
|
||||
|
||||
$matches = (count(explode('/', rtrim($url, '/'))) == count(explode('/', rtrim($route, '/'))));
|
||||
$matches = true;
|
||||
|
||||
if($this->regexMatch) {
|
||||
$parameters = $this->parseParameters($url, true, $this->regexMatch);
|
||||
@@ -61,6 +61,8 @@ class RouterRoute extends RouterEntry {
|
||||
|
||||
} else {
|
||||
|
||||
$matches = (count(explode('/', rtrim($url, '/'))) == count(explode('/', rtrim($route, '/'))));
|
||||
|
||||
$url = explode('/', $url);
|
||||
$route = explode('/', rtrim($route, '/'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user