Bug #16747 Updated: Empty file upload field results in "No file uploaded in Unknown on line 0" warn
| From: | sesser@php.net | Date: | Thu, 06 Jun 2002 08:19:50 +0000 |
| Subject: | Bug #16747 Updated: 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-9599@lists.php.net to get a copy of this message | ||
ID: 16747
Updated by: sesser@php.net
Reported By: hannes.dorn@ibit.at
-Status: Bogus
+Status: Closed
Bug Type: Output Control
Operating System: Windows 2000 SP2, Apache 1.3.22
PHP Version: 4.2.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2002-06-06 04:06:28] irik@irik.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.dorn@ibit.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