Bug #16747 Updated: Empty file upload field results in "No file uploaded in Unknown on line 0" warn

From: Date: Thu, 06 Jun 2002 08:06:29 +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-9597@lists.php.net to get a copy of this message
ID: 16747 Updated by: irik@irik.org Reported By: hannes.dorn@ibit.at Status: Bogus Bug Type: Output Control Operating System: Windows 2000 SP2, Apache 1.3.22 PHP Version: 4.2.0 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#9597) next »