php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31793 $_FILES["photo"]["error"]
Submitted: 2005-02-01 15:16 UTC Modified: 2005-02-01 15:44 UTC
From: skyfox at isp dot ee Assigned:
Status: Not a bug Package: *Programming Data Structures
PHP Version: 4.3.10 OS: debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: skyfox at isp dot ee
New email:
PHP Version: OS:

 

 [2005-02-01 15:16 UTC] skyfox at isp dot ee
Description:
------------
I try verify for upload photos, but verify broken upload photo not work!
this is my code:




Reproduce code:
---------------
  if ($_FILES["photo"]["error"]==UPLOAD_ERR_NO_FILE){return($lns[49]);}
  if ($_FILES["photo"]["error"]==UPLOAD_ERR_PARTIAL){return($lns[50]);}
  if (($_FILES["photo"]["error"]==UPLOAD_ERR_INI_SIZE)||($_FILES["photo"]["error"]==UPLOAD_ERR_FORM_SIZE)){return($lns[51]);}
  if ($_FILES["photo"]["error"]<>UPLOAD_ERR_OK){return('Error:'.$_FILES["photo"]["error"]);}


Expected result:
----------------
all error=UPLOAD_ERR_OK, but script can upload broken photos,
more info from  http://bugs.php.net/bug.php?id=31726


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-01 15:44 UTC] derick@php.net
This function does NOT check for the contents of files - please, there is no bug here - stop spamming us about this issue.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 23 16:03:36 2021 UTC