|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-01-19 17:15 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 05:00:01 2025 UTC |
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)