php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60808 No file uploaded in Unknown on line 0
Submitted: 2012-01-19 17:15 UTC Modified: 2012-01-19 18:12 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ava3ar at gmail dot com Assigned: joey (profile)
Status: Closed Package: FPM related
PHP Version: 5.4SVN-2012-01-19 (SVN) OS: Gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ava3ar at gmail dot com
New email:
PHP Version: OS:

 

 [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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-19 18:12 UTC] joey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: joey
 [2012-01-19 18:12 UTC] 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 18:14 UTC] joey@php.net
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)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 05:01:27 2024 UTC