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]);
|
||||
} else {
|
||||
$langSet = self::$range;
|
||||
|
||||
Reference in New Issue
Block a user