mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
[BUGFIX] Fixed parameters on custom regex match.
This commit is contained in:
@@ -26,8 +26,8 @@ class RouterRoute extends RouterEntry {
|
|||||||
// Match on custom defined regular expression
|
// Match on custom defined regular expression
|
||||||
if($this->regexMatch) {
|
if($this->regexMatch) {
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
if(preg_match('/'.$this->regexMatch.'/is', $url, $parameters)) {
|
if(preg_match('/('.$this->regexMatch.')/is', $url, $parameters)) {
|
||||||
$this->parameters = $parameters[0];
|
$this->parameters = (!is_array($parameters[0]) ? array($parameters[0]) : $parameters[0]);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user