Compare commits

...

2 Commits

Author SHA1 Message Date
Simon Sessingø f2fd5261c1 Merge pull request #34 from skipperbent/development
[BUGFIX] Fixed parameters on custom regex match.
2015-11-21 20:34:45 +01:00
Simon Sessingø 02de9572fa [BUGFIX] Fixed parameters on custom regex match. 2015-11-21 20:31:44 +01:00
+2 -2
View File
@@ -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;
}
}