no message

This commit is contained in:
hellcat 2026-04-30 15:44:52 +08:00
parent 2bb9915ada
commit f7c019fa87

View File

@ -13,7 +13,7 @@ class Nice
* @param bool $bDefault 默认值 * @param bool $bDefault 默认值
* @return bool * @return bool
*/ */
public function ensureBool(mixed $xValue, bool $bDefault = false): bool public static function ensureBool(mixed $xValue, bool $bDefault = false): bool
{ {
// 如果为 null 直接返回默认值,避免 filter_var 的空字符串陷阱 // 如果为 null 直接返回默认值,避免 filter_var 的空字符串陷阱
if (is_null($xValue)) { if (is_null($xValue)) {