mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding regex limiter for route $requirements
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3453 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f9b45b4114
commit
fe903b2531
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ class Router extends Overloadable {
|
|||
|
||||
if (preg_match('/^:(.+)$/', $element, $r)) {
|
||||
if (isset($requirements[$r[1]])) {
|
||||
$parsed[] = '(?:\/(' . $requirements[$r[1]] . '))?';
|
||||
$parsed[] = '(?:\/(' . $requirements[$r[1]] . '))';
|
||||
} else {
|
||||
$parsed[] = '(?:\/([^\/]+))?';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue