Parcourir la source

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

jqh il y a 4 ans
Parent
commit
ff8ec4b8fb
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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 [];
         }