Skip to content

Commit

Permalink
Merge pull request #50 from fripas/patch-1
Browse files Browse the repository at this point in the history
Accepts `$Params` like `$foo_bar` that contain underscores
  • Loading branch information
arzynik committed Feb 14, 2018
2 parents 053147c + 0478a7a commit 9d46d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Route.php
Expand Up @@ -69,7 +69,7 @@ public function match($page) {
} }
} }


$r = preg_replace('/:[a-z]+/i','.*',$this->_route); $r = preg_replace('/:[a-z_]+/i','.*',$this->_route);
$r = preg_replace('/\//','\/',$r); $r = preg_replace('/\//','\/',$r);


if (preg_match('/^'.$r.'$/'.($this->_caseSensitive ? '' : 'i'),$page)) { if (preg_match('/^'.$r.'$/'.($this->_caseSensitive ? '' : 'i'),$page)) {
Expand Down

0 comments on commit 9d46d31

Please sign in to comment.