#35351 [NEW]: error_reporting(0); does not suppress E_WARNING during a file upload.
From: ragekab at yahoo dot com
Operating system: Windows / Linux
PHP version: 4.4.1
PHP Bug Type: HTTP related
Bug description: error_reporting(0); does not suppress E_WARNING during a file upload.
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 bug report at http://bugs.php.net/?id=35351&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35351&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35351&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35351&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35351&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35351&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35351&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35351&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35351&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35351&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35351&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35351&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35351&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35351&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35351&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35351&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35351&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35351&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35351&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35351&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35351&r=mysqlcfg
Thread (3 messages)
- ragekab at yahoo dot com