Explorar el Código

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

jqh hace 4 años
padre
commit
ff8ec4b8fb
Se han modificado 1 ficheros con 1 adiciones y 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 [];
         }