php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20322 function is_uploaded_file returns wrong value
Submitted: 2002-11-08 19:45 UTC Modified: 2002-11-09 14:32 UTC
From: alexf at itechwebdesigns dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.3 OS: Win2K
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 - 40 = ?
Subscribe to this entry?

 
 [2002-11-08 19:45 UTC] alexf at itechwebdesigns dot com
According to the documentation, the function "is_uploaded_file" is supposed to return "true" if successful. However it is returning 0 or false even though the file upload was successful according to the $_FILES['filename']['error'] which is present in 4.2.3. I'm going to assume that the function is returning the value of the error code (in this case, 0) which is very confusing. The file was uploaded via HTTP POST. In summary, this function should not return the value of $_FILES['filename']['error'].

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-09 09:57 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
 [2002-11-09 14:32 UTC] alexf at itechwebdesigns dot com
I'm sorry! I goofed. I passed as the argument to the function, $_FILE['filename']['tmp_name'] which gave me the result that it should. DOH! It should have been $_FILES['filename']['tmp_name'].
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 19:01:30 2024 UTC