#16747 [Com]: Empty file upload field results in "No file uploaded in Unknown on line 0" warn
| From: | vitek at 4rome dot ru | Date: | Wed, 13 Oct 2004 14:54:16 +0000 |
| Subject: | #16747 [Com]: Empty file upload field results in "No file uploaded in Unknown on line 0" warn | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67536@lists.php.net to get a copy of this message | ||
ID: 16747
Comment by: vitek at 4rome dot ru
Reported By: hannes dot dorn at ibit dot at
Status: Closed
Bug Type: Output Control
Operating System: Windows 2000 SP2, Apache 1.3.22
PHP Version: 4.2.0
New Comment:
I am using php5.0.2 on a Linux platform and I am having this bug, too.
It is annoying (a notice appears, I also cannot send any headers) and I
really don't want to develope with error_reporting level different from
E_ALL as well as using output bufferring just to avoid a problem with
headers.
Please indicate if it is a strange behaviour to php5.0.2 or this issue
hasn't been treated yet in this lovely version of php. I hope most of
developers would agree that it IS more a bug rather than a feature
(even if it is represented as a feature).
Previous Comments:
------------------------------------------------------------------------
[2002-07-16 19:03:19] m at balieu dot net
I fully support the dropping of the "Notice".
Balieu
------------------------------------------------------------------------
[2002-06-06 04:19:50] sesser@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-06-06 04:06:28] irik at irik dot org
If the development of PHP were a democracy (and it's not far off, I
reckon :), I would vote (and maybe even campaign) to have this notice
removed. Whether or not the user chooses to upload a file or is
required to is a matter of application design and the sole
responsibilty of the developer to address. What if a file upload is
designed to optional? Why do I need to change the error reporting
level on the server in order to suppress on Notice that is if fact
completely useless to both the developer and the user. What benefit is
it to the developer or the administrator to have notice in the logs that
the user did not upload a file in a provided file box?
I vote to drop the "Notice" and let it go.
Irik
------------------------------------------------------------------------
[2002-04-23 18:29:00] sniper@php.net
Not a bug but expected behaviour. It's changed to E_NOTICE
level now in CVS (for both HEAD and upcoming 4.2.1 release)
Just set your error_reporting level.
--Jani
------------------------------------------------------------------------
[2002-04-23 06:24:28] hannes dot dorn at ibit dot at
maybe this is only a config issue in php.ini
test.htm:
<html>
<body>
<FORM METHOD="POST" ACTION="test.php" NAME="form"
enctype="multipart/form-data">
<INPUT TYPE="file" NAME="admin_field_image_big_row1"
MAXLENGTH="102400" SIZE="5" ACCEPT="image/*">
<input type="submit" name="submit" value="test">
</form>
</body>
</html>
test.php
<?php
foreach( $GLOBALS[ "HTTP_POST_VARS" ] as $sName => $sValue )
echo "$sName = $sValue<br>";
?>
--> Outputs warning No file uploaded in Unknown on line 0
Thanks,
Rasty
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16747&edit=1