Explorar o código

修复Helper::array()会把0转为空数组问题

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
ff8ec4b8fb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Support/Helper.php

+ 1 - 1
src/Support/Helper.php

@@ -46,7 +46,7 @@ class Helper
      */
     public static function array($value, bool $filter = true): array
     {
-        if (! $value) {
+        if ($value === null || $value === '' || $value === []) {
             return [];
         }