mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +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);
|
}, $route);
|
||||||
|
|
||||||
|
// Replace unnecessary regexp.
|
||||||
|
$route = preg_replace('/\\.[*+?]/', '', $route);
|
||||||
|
|
||||||
// Add a query string for the remaining arguments.
|
// Add a query string for the remaining arguments.
|
||||||
return $route . (count($vars) ? ('?' . http_build_query($vars)) : '');
|
return $route . (count($vars) ? ('?' . http_build_query($vars)) : '');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue