1--TEST--
2rfc1867 max_file_uploads - empty files shouldn't count
3--INI--
4file_uploads=1
5max_file_uploads=2
6--POST_RAW--
7Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
8-----------------------------20896060251896012921717172737
9Content-Disposition: form-data; name="file2"; filename=""
10Content-Type: text/plain-file
11
12
13-----------------------------20896060251896012921717172737
14Content-Disposition: form-data; name="file3"; filename=""
15Content-Type: text/plain-file
16
1733
18-----------------------------20896060251896012921717172737
19Content-Disposition: form-data; name="file4"; filename="file4.txt"
20Content-Type: text/plain-file
21
22
23-----------------------------20896060251896012921717172737
24Content-Disposition: form-data; name="file1"; filename="file1.txt"
25Content-Type: text/plain-file
26
271
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["file4"]["tmp_name"])) {
37    var_dump(file_get_contents($_FILES["file4"]["tmp_name"]));
38}
39?>
40--EXPECTF--
41array(4) {
42  ["file2"]=>
43  array(6) {
44    ["name"]=>
45    string(0) ""
46    ["full_path"]=>
47    string(0) ""
48    ["type"]=>
49    string(0) ""
50    ["tmp_name"]=>
51    string(0) ""
52    ["error"]=>
53    int(4)
54    ["size"]=>
55    int(0)
56  }
57  ["file3"]=>
58  array(6) {
59    ["name"]=>
60    string(0) ""
61    ["full_path"]=>
62    string(0) ""
63    ["type"]=>
64    string(0) ""
65    ["tmp_name"]=>
66    string(0) ""
67    ["error"]=>
68    int(4)
69    ["size"]=>
70    int(0)
71  }
72  ["file4"]=>
73  array(6) {
74    ["name"]=>
75    string(9) "file4.txt"
76    ["full_path"]=>
77    string(9) "file4.txt"
78    ["type"]=>
79    string(15) "text/plain-file"
80    ["tmp_name"]=>
81    string(%d) "%s"
82    ["error"]=>
83    int(0)
84    ["size"]=>
85    int(0)
86  }
87  ["file1"]=>
88  array(6) {
89    ["name"]=>
90    string(9) "file1.txt"
91    ["full_path"]=>
92    string(9) "file1.txt"
93    ["type"]=>
94    string(15) "text/plain-file"
95    ["tmp_name"]=>
96    string(%d) "%s"
97    ["error"]=>
98    int(0)
99    ["size"]=>
100    int(1)
101  }
102}
103array(0) {
104}
105string(1) "1"
106string(0) ""
107