webman-buildadmin框架优化

This commit is contained in:
2026-03-18 19:21:10 +08:00
parent 16f84dce24
commit 9effe705b3
6 changed files with 29 additions and 19 deletions

View File

@@ -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;
}