From:             edman007 at edman007 dot com
Operating system: Linux
PHP version:      5.2.4RC3
PHP Bug Type:     Feature/Change Request
Bug description:  File Upload Behavior with E_STRICT error_reporting

Description:
------------
When error_reporting is set to E_STRICT PHP will throw a notice if a file
was not uploaded, this causes problems when developing a website with
optional file upload.

The actual problem is detailed in bug #6747 but that was closed saying its
"expected behaviour". However if this is expected behavior then why it it
not listed anywhere in the documentation except for the set_error_handler()
docs where it ways your basically SOL when it comes to this error (and it
mentions no other similar error), the docs on uploading files make no
mention of this error either.

The fact is this does cause problems when developing a website, in the
comments for the other bug there are multiple people requesting its removal
suggesting there is in fact a problem. In my particular case the error
broke the HTML on the page and prevented cookies, and the proper fix is
"Just set your error_reporting level."?

E_STRICT exists so it can be used, what good is it when the correct usage
of something (in this case an upload form) throws and error that cannot be
caught? When I don't fill out a text field it sends an empty field to the
server, under the same logic wouldn't that mean that an error should be
thrown when I leave any field blank?

This error should be completely removed, what it is providing is not only
already listed in $_FILES but the error is thrown when nothing is wrong and
completely caused by user input and nothing else (the code in the file is
irrelevant). If not removed then there should at the very least be some
method to avoid the error, it appears to be the only non-fatal error that
cannot be caught or suppressed, this needs to be fixed.


-- 
Edit bug report at http://bugs.php.net/?id=42422&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42422&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42422&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42422&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42422&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42422&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42422&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42422&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42422&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42422&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42422&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42422&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42422&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42422&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42422&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42422&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42422&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42422&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42422&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42422&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42422&r=mysqlcfg

Reply via email to