Sfoglia il codice sorgente

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

jqh 4 anni fa
parent
commit
ff8ec4b8fb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 [];
         }