mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进路由分组的URL匹配检查
This commit is contained in:
@@ -871,12 +871,13 @@ class Route
|
||||
|
||||
if (is_array($rule)) {
|
||||
// 分组路由
|
||||
if (($pos = strpos($key, ':')) || ($pos = strpos($key, '<'))) {
|
||||
$pos = strpos(str_replace('<', ':', $key), ':');
|
||||
if (false !== $pos) {
|
||||
$str = substr($key, 0, $pos);
|
||||
} else {
|
||||
$str = $key;
|
||||
}
|
||||
if (is_string($str) && 0 !== strpos($url, $str)) {
|
||||
if (is_string($str) && $str && 0 !== strpos($url, $str)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user