Bug #18286 Updated: UPLOAD_ERROR_X constants differ from documentation

From: Date: Fri, 12 Jul 2002 04:45:32 +0000
Subject: Bug #18286 Updated: UPLOAD_ERROR_X constants differ from documentation
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-13904@lists.php.net to get a copy of this message
ID: 18286 Updated by: powerlord@vgmusic.com Reported By: powerlord@vgmusic.com Status: Open Bug Type: Documentation problem Operating System: Linux 2.4.x PHP Version: 4.3.0 New Comment: I see, they aren't constants at all, but error messages caught on E_NOTICE. The way they are listed on the features.file-upload.errors page (since it lists error numbers in reference to them) in association with the value of $_FILES["userfile"]["error"] implies that they are constants. It would be really handy if $_FILES["userfile"]["error"] and $userfile_error were mentioned in the features.file-upload section along with the relevant error numbers. Previous Comments: ------------------------------------------------------------------------ [2002-07-11 18:10:16] philip@php.net The documentation at features.file-upload.errors is a little unclear on this matter. Are these suppose to be PHP constants too? See also: * http://marc.theaimsgroup.com/?l=php-dev&m=101246726632633 * http://lxr.php.net/source/php4/main/rfc1867.c Btw, they return those strings because they are undefined. print ANYTHING; will do that and throw an error of level E_NOTICE. ------------------------------------------------------------------------ [2002-07-11 17:22:27] powerlord@vgmusic.com I am using PHP on Apache 1.3.26. When attempting to use the UPLOAD_ERROR_A through UPLOAD_ERROR_E constants, they return the following: UPLOAD_ERROR_A returns the string UPLOAD_ERROR_A UPLOAD_ERROR_B returns the string UPLOAD_ERROR_B UPLOAD_ERROR_C returns the string UPLOAD_ERROR_C UPLOAD_ERROR_D returns the string UPLOAD_ERROR_D UPLOAD_ERROR_E returns the string UPLOAD_ERROR_E This is what *should* happen according to documentation: UPLOAD_ERROR_A should return the value 1 UPLOAD_ERROR_B should return the value 2 UPLOAD_ERROR_C should return the value 3 UPLOAD_ERROR_D should return the value 4 UPLOAD_ERROR_E should return the value 5 This is reproducible using <?php echo UPLOAD_ERROR_A ?> (Please note the lack of quotes before marking this as bogus). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18286&edit=1

« previous php.bugs (#13904) next »