Browse Source

support php 7.0

walkor 3 năm trước cách đây
mục cha
commit
e965791e21
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/Protocols/Http/Request.php

+ 2 - 2
src/Protocols/Http/Request.php

@@ -554,7 +554,7 @@ class Request
             if (!\strpos($content_line, ': ')) {
                 return 0;
             }
-            [$key, $value] = \explode(': ', $content_line);
+            list($key, $value) = \explode(': ', $content_line);
             switch (strtolower($key)) {
                 case "content-disposition":
                     // Is file data.
@@ -580,7 +580,7 @@ class Request
                             'tmp_name' => $tmp_file,
                             'size' => $size,
                             'error' => $error,
-                            'type' => null,
+                            'type' => '',
                         ];
                         break;
                     } // Is post field.