ID:               35351
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ragekab at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         HTTP related
 Operating System: Windows / Linux
 PHP Version:      4.4.1
 New Comment:

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

File uploads are handled before your script runs, so setting
error_reporting(0) in your script doesn't work as the warning is thrown
before this code is reached.


Previous Comments:
------------------------------------------------------------------------

[2005-11-23 17:32:26] ragekab at yahoo dot com

Description:
------------
error_reporting(0); does not suppress E_WARNING during a file upload if
it exceeds upload_max_filesize (php.ini directive) or MAX_FILE_SIZE
(hidden field).

Reproduce code:
---------------
<?php
error_reporting(0);
?>

<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000" />
<input type="submit" />
</form>

Expected result:
----------------
This should not throw an E_WARNING if you submit the form with a file
that exceeds 1000 bytes since error_reporting(0); was set above any
code.

Actual result:
--------------
PHP throws a warning message:

Warning: MAX_FILE_SIZE of 1000 bytes exceeded - file...


* This is also true if you submitted a file larger than
upload_max_filesize. PHP will throw a warning message:

Warning: upload_max_filesize of 1048576 bytes exceeded - file... (where
1048576 bytes is the php.ini upload_max_filesize directive of 1M in this
example)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35351&edit=1

Reply via email to