1--TEST--
2rfc1867 empty upload
3--INI--
4file_uploads=1
5upload_max_filesize=1024
6max_file_uploads=10
7--POST_RAW--
8Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
9-----------------------------20896060251896012921717172737
10Content-Disposition: form-data; name="foo"
11
12
13-----------------------------20896060251896012921717172737
14Content-Disposition: form-data; name="file1"; filename="file1.txt"
15Content-Type: text/plain-file1
16
171
18-----------------------------20896060251896012921717172737
19Content-Disposition: form-data; name="file2"; filename=""
20Content-Type: text/plain-file2
21
22
23-----------------------------20896060251896012921717172737
24Content-Disposition: form-data; name="file3"; filename="file3.txt"
25Content-Type: text/plain-file3
26
273
28-----------------------------20896060251896012921717172737--
29--FILE--
30<?php
31var_dump($_FILES);
32var_dump($_POST);
33if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
34	var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
35}
36if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
37	var_dump(file_get_contents($_FILES["file3"]["tmp_name"]));
38}
39?>
40--EXPECTF--
41array(3) {
42  ["file1"]=>
43  array(5) {
44    ["name"]=>
45    string(9) "file1.txt"
46    ["type"]=>
47    string(16) "text/plain-file1"
48    ["tmp_name"]=>
49    string(%d) "%s"
50    ["error"]=>
51    int(0)
52    ["size"]=>
53    int(1)
54  }
55  ["file2"]=>
56  array(5) {
57    ["name"]=>
58    string(0) ""
59    ["type"]=>
60    string(0) ""
61    ["tmp_name"]=>
62    string(0) ""
63    ["error"]=>
64    int(4)
65    ["size"]=>
66    int(0)
67  }
68  ["file3"]=>
69  array(5) {
70    ["name"]=>
71    string(9) "file3.txt"
72    ["type"]=>
73    string(16) "text/plain-file3"
74    ["tmp_name"]=>
75    string(%d) "%s"
76    ["error"]=>
77    int(0)
78    ["size"]=>
79    int(1)
80  }
81}
82array(1) {
83  ["foo"]=>
84  string(0) ""
85}
86string(1) "1"
87string(1) "3"
88