We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2a618f + 02de957 commit f2fd526Copy full SHA for f2fd526
src/Pecee/SimpleRouter/RouterRoute.php
@@ -26,8 +26,8 @@ public function matchRoute(Request $request) {
26
// Match on custom defined regular expression
27
if($this->regexMatch) {
28
$parameters = array();
29
- if(preg_match('/'.$this->regexMatch.'/is', $url, $parameters)) {
30
- $this->parameters = $parameters[0];
+ if(preg_match('/('.$this->regexMatch.')/is', $url, $parameters)) {
+ $this->parameters = (!is_array($parameters[0]) ? array($parameters[0]) : $parameters[0]);
31
return $this;
32
}
33
0 commit comments