Browse Source

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

jqh 4 năm trước cách đây
mục cha
commit
ff8ec4b8fb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 [];
         }