PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Upload » Bug #3080

wrong error messages

Details

Submitted2005-01-03 11:53 UTC
Frompeter at linzenkirchner dot de
StatusNo Feedback
PackageHTTP_Upload
PHP Version4.3.9
OSMAC OS X 10.3.7
Roadmaps(Not assigned)

Comments

[2005-01-03 11:53 UTC] peter at linzenkirchner dot de

Description:
------------
file size > MAX_FILE_SIZE && < upload_max_filesize: =>
error message correct.
file size > upload_max_filesize && < post_max_size: =>
error message "NO_USER_FILE" (wrong).
file size > post_max_size: => error message "
NO_USER_FILE" (wrong)

Reproduce code:
---------------
I assume, the following condition is wrong:

function HTTP_Upload_File(xxx etc.)
{
xxxxxx etc
if (empty($name) || $size == 0) {

It should be:
if (empty($name) && $size == 0) {

Expected result:
----------------
correct error message whe file size between
upload_max_filesize and post_max_size. When file size >
post_max_size the wrong error message remains.

I dont have a real idea to fix file size >
post_max_size. I presume, I will include a dummy hidden
field in my upload form - if the file size >
post_max_size this dummy will remain empty and can be
checked in an extension of the HTTP_UPLOAD class.