mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
优化语言判断
This commit is contained in:
@@ -211,7 +211,7 @@ class Lang
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match('/^([a-z\d\-]+)/i', $langSet, $matches)) {
|
if (preg_match('/^([a-z0-9\-_]{2,10})$/i', $langSet, $matches)) {
|
||||||
$langSet = strtolower($matches[1]);
|
$langSet = strtolower($matches[1]);
|
||||||
} else {
|
} else {
|
||||||
$langSet = self::$range;
|
$langSet = self::$range;
|
||||||
|
|||||||
Reference in New Issue
Block a user