mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Merge pull request #34 from skipperbent/development
[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
|
||||
if($this->regexMatch) {
|
||||
$parameters = array();
|
||||
if(preg_match('/'.$this->regexMatch.'/is', $url, $parameters)) {
|
||||
$this->parameters = $parameters[0];
|
||||
if(preg_match('/('.$this->regexMatch.')/is', $url, $parameters)) {
|
||||
$this->parameters = (!is_array($parameters[0]) ? array($parameters[0]) : $parameters[0]);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user