Bug #60808 [Com]: No file uploaded in Unknown on line 0
| From: | joey@php.net | Date: | Thu, 19 Jan 2012 18:14:20 +0000 |
| Subject: | Bug #60808 [Com]: No file uploaded in Unknown on line 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166615@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60808&edit=1
ID: 60808
Comment by: joey@php.net
Reported by: ava3ar at gmail dot com
Summary: No file uploaded in Unknown on line 0
Status: Closed
Type: Bug
Package: FPM related
Operating System: Gentoo
PHP Version: 5.4SVN-2012-01-19 (SVN)
Assigned To: joey
Block user comment: N
Private report: N
New Comment:
Specifically, this is why you're getting the message:
#if DEBUG_FILE_UPLOAD
sapi_module.sapi_error(E_NOTICE, "No file uploaded");
#endif
(main/rfc1867.c - lines 976-978)
Previous Comments:
------------------------------------------------------------------------
[2012-01-19 18:12:07] joey@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is the expected behaviour when there are no files uploaded and you compiled with debug enabled.
------------------------------------------------------------------------
[2012-01-19 17:15:47] ava3ar at gmail dot com
Description:
------------
If you create a form with a file input
and press submit without using the file input
it causes a notice, which it shouldnt do, and in 5.3 doesnt
Test script:
---------------
<?php
print_r($_POST);
print_r($_FILES);
?>
<form method="post" id="creation" enctype="multipart/form-data"
action="" accept-charset="UTF-8">
<label for="arttitle" id="labelarttitle">Title:</label>
<input type="text" id="arttitle" name="arttitle"
placeholder="Title" title="Title" />
<input type="file" id="primaryImage" name="image1"
placeholder="image1" title="Main Image" />
<button type="submit" id="submitButtonID">Submit</button>
</form>
Expected result:
----------------
User created error, caused by user validation (if any)
not a PHP engine notice
Actual result:
--------------
PHP Engine notice
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60808&edit=1