Bug #16747
| From: | Shaun Thomas | Date: | Fri, 10 May 2002 13:51:37 +0000 |
| Subject: | Bug #16747 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96950@lists.php.net to get a copy of this message | ||
For those with error_reporting set to E_ALL, this affects you.
After seeing this: "Warning: No file uploaded in unknown on line 0",
probably the least useful error message I've ever seen, I did some
investigation.
The PHP developers seem to think that if you have a form upload on your
page, and a user decides not to upload a file, it is an offense akin to
a full warning.
According to bug #16747, in 4.2.1 (not yet released), it's at least set
to a notice. But what I'd like to know, is who actually agrees with this
assumption?
Say you have a development machine you turn errors to E_ALL to make sure
no errors go into production. Say you have a form upload with many
elements, one of which is an *OPTIONAL* file upload you check in
$_FILES. How is it *any* kind of error, warning, or notice, when all
the information you need about uploaded files is in $_FILES?
The answer to this in bug #16747 is to turn off notices. Yeah, that's
great, but the whole point in leaving them on is to catch things like
quoted array elements ($someArr['thingy']) and other non-fatal but still
notable mishaps. How is something that is *completely out of our
control* a *notice of any kind*? Syntax issues we can change. Whether
or not a user decides to utilize an optional file field, we can not.
Sure, our production system turns off all errors, and logs everything
else because we assume bugs have been weeded out in development. But
now in our devel systems, we have to turn off E_ALL, because of one
notice that shouldn't even really be a notice.
I can't be the only one this affects. Can one of the developers support
this behavior, or is it some kind of arbitrary decision?
--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Administrator |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: sthomas@townnews.com AIM : trifthen |
| Web : www.townnews.com |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+