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  [%u|b%"file1"]=>
43  array(5) {
44    [%u|b%"name"]=>
45    %string|unicode%(9) "file1.txt"
46    [%u|b%"type"]=>
47    %string|unicode%(16) "text/plain-file1"
48    [%u|b%"tmp_name"]=>
49    %string|unicode%(%d) "%s"
50    [%u|b%"error"]=>
51    int(0)
52    [%u|b%"size"]=>
53    int(1)
54  }
55  [%u|b%"file2"]=>
56  array(5) {
57    [%u|b%"name"]=>
58    %string|unicode%(0) ""
59    [%u|b%"type"]=>
60    %string|unicode%(0) ""
61    [%u|b%"tmp_name"]=>
62    %string|unicode%(0) ""
63    [%u|b%"error"]=>
64    int(4)
65    [%u|b%"size"]=>
66    int(0)
67  }
68  [%u|b%"file3"]=>
69  array(5) {
70    [%u|b%"name"]=>
71    %string|unicode%(9) "file3.txt"
72    [%u|b%"type"]=>
73    %string|unicode%(16) "text/plain-file3"
74    [%u|b%"tmp_name"]=>
75    %string|unicode%(%d) "%s"
76    [%u|b%"error"]=>
77    int(0)
78    [%u|b%"size"]=>
79    int(1)
80  }
81}
82array(1) {
83  [%u|b%"foo"]=>
84  %unicode|string%(0) ""
85}
86string(1) "1"
87string(1) "3"
88