webman-buildadmin框架优化
This commit is contained in:
@@ -845,8 +845,9 @@ class Helper
|
||||
return $itemJson;
|
||||
}
|
||||
|
||||
public static function formatObjectKey(string $keyName): string
|
||||
public static function formatObjectKey(string|int $keyName): string
|
||||
{
|
||||
$keyName = (string) $keyName;
|
||||
if (preg_match("/^[a-zA-Z_][a-zA-Z0-9_]+$/", $keyName)) {
|
||||
return $keyName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user