[BUGFIX] Fixed parameters on custom regex match.

This commit is contained in:
Simon Sessingø
2015-11-21 20:31:44 +01:00
parent e5700477e0
commit 02de9572fa
+2 -2
View File
@@ -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;
} }
} }