|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-05-30 15:26 UTC] sean at digitalspinner dot com
Visit: http://www.groupit.org/contribute/demonstrationarea/contenttypes/documents/b.21.html On this page there is one required file upload field, and a second optional field (for an image that can be automatically scaled and placed within the summary of the contribution). When a document file is specified, and an image is not, the error "File not uploaded" is stored within $php_errormsg. Presumably this is because the contrib_image variable is not set. Since this is not truly an error condition I think PHP should NOT log an error for this event. I imagine there are many other PHP-based sites with optional file upload fields that are now generating spurious error messages to site administrators (grin). This functionality was not evident in 4.1.2 or earlier versions. The $php_errormsg should contain actual errors only. Thanks for your time - and thanks for creating such a great development language! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 12:00:01 2025 UTC |
diff -uri php-4.2.2.orig/main/rfc1867.c php-4.2.2/main/rfc1867.c --- php-4.2.2.orig/main/rfc1867.c Sat Jul 20 14:17:52 2002 +++ php-4.2.2/main/rfc1867.c Mon Sep 9 13:28:02 2002 @@ -750,7 +750,7 @@ cancel_upload = 0; if(strlen(filename) == 0) { -#ifdef DEBUG_FILE_UPLOAD +#if 0 sapi_module.sapi_error(E_NOTICE, "No file uploaded"); #endif cancel_upload = UPLOAD_ERROR_D;