diff --git a/src/Services/TomTool/Nice.php b/src/Services/TomTool/Nice.php index adf12fcc4..6c477bc55 100755 --- a/src/Services/TomTool/Nice.php +++ b/src/Services/TomTool/Nice.php @@ -13,7 +13,7 @@ class Nice * @param bool $bDefault 默认值 * @return bool */ - public function ensureBool(mixed $xValue, bool $bDefault = false): bool + public static function ensureBool(mixed $xValue, bool $bDefault = false): bool { // 如果为 null 直接返回默认值,避免 filter_var 的空字符串陷阱 if (is_null($xValue)) {