php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14310 Uploaded empty files treated differently
Submitted: 2001-12-01 16:33 UTC Modified: 2001-12-01 16:56 UTC
From: a dot genkin at utoronto dot ca Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.6 OS: Linux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: a dot genkin at utoronto dot ca
New email:
PHP Version: OS:

 

 [2001-12-01 16:33 UTC] a dot genkin at utoronto dot ca
When a zero-length file is uploaded, the temporary file is not
created, and the appropriate variable is set to 'none'.  This forces
me into all sorts of hacks in my php code (can't use
is_uploaded_file() and move_uploaded_file(), for instance), to give
empty files special treatment.

I think that *a file is a file*, and its size should not matter, as
long as it is within limits.

Many thanks,
-- 
Arcady Genkin

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-01 16:56 UTC] derick@php.net
Fixed in CVS. You'll have to wait for version 4.2.0...

Derick
 [2002-04-25 17:06 UTC] dmitri at rm-f dot net
Derick, I assume the change happened here:

http://cvs.php.net/diff.php/php4/main/rfc1867.c?r1=1.86&r2=1.87

Why is it an error to upload an empty file, though?

Thank you,
   Dmitri.
 [2002-04-25 17:43 UTC] dmitri at rm-f dot net
After looking at HTTP traffic for file upload POST requests, I would like to retract my question -- it is impossible to distinguish between empty files and files that do not exist on the client machine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC