mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Automatically remove .* .+ .? in route definition regexp #2287
This commit is contained in:
parent
0cc034909c
commit
289a249569
1 changed files with 3 additions and 0 deletions
|
|
@ -636,6 +636,9 @@ class Router
|
|||
}
|
||||
}, $route);
|
||||
|
||||
// Replace unnecessary regexp.
|
||||
$route = preg_replace('/\\.[*+?]/', '', $route);
|
||||
|
||||
// Add a query string for the remaining arguments.
|
||||
return $route . (count($vars) ? ('?' . http_build_query($vars)) : '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue