cvs: php-src / NEWS /main rfc1867.c
| From: | Derick Rethans | Date: | Thu, 25 Mar 2004 21:27:23 +0000 |
| Subject: | cvs: php-src / NEWS /main rfc1867.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-26779@lists.php.net to get a copy of this message | ||
derick Thu Mar 25 16:27:23 2004 EDT
Modified files:
/php-src NEWS
/php-src/main rfc1867.c
Log:
- Stopped file uploads from throwing E_WARNINGs and E_NOTICEs which can not be
hidden from within scripts (and a result value in the $_FILES global can be
used to see the real failure anyway).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1657&r2=1.1658&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1657 php-src/NEWS:1.1658
--- php-src/NEWS:1.1657 Thu Mar 25 13:04:08 2004
+++ php-src/NEWS Thu Mar 25 16:27:23 2004
@@ -1,6 +1,9 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ????? 2004, PHP 5 Release Candidate 2
+- Stopped file uploads from throwing E_WARNINGs and E_NOTICEs which can not be
+ hidden from within scripts (and a result value in the $_FILES global can be
+ used to see the real failure anyway). (Derick)
- Reimplement zend.ze1_compatibility_mode to have better PHP 4 complicance.
(Dmitry, Andi)
- Changed __construct() to always take precedence over old style constructor.
http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.153&r2=1.154&ty=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.153 php-src/main/rfc1867.c:1.154
--- php-src/main/rfc1867.c:1.153 Wed Mar 24 09:28:41 2004
+++ php-src/main/rfc1867.c Thu Mar 25 16:27:23 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.153 2004/03/24 14:28:41 derick Exp $ */
+/* $Id: rfc1867.c,v 1.154 2004/03/25 21:27:23 derick Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -33,7 +33,7 @@
#include "php_variables.h"
#include "rfc1867.h"
-#undef DEBUG_FILE_UPLOAD
+#define DEBUG_FILE_UPLOAD ZEND_DEBUG
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
#include "ext/mbstring/mbstring.h"
@@ -957,16 +957,22 @@
while (!cancel_upload && (blen = multipart_buffer_read(mbuff, buff, sizeof(buff)
TSRMLS_CC)))
{
if (PG(upload_max_filesize) > 0 && total_bytes > PG(upload_max_filesize)) {
- sapi_module.sapi_error(E_WARNING, "upload_max_filesize of %ld bytes exceeded - file
[%s=%s] not saved", PG(upload_max_filesize), param, filename);
+#ifdef DEBUG_FILE_UPLOAD
+ sapi_module.sapi_error(E_NOTICE, "upload_max_filesize of %ld bytes exceeded - file
[%s=%s] not saved", PG(upload_max_filesize), param, filename);
+#endif
cancel_upload = UPLOAD_ERROR_A;
} else if (max_file_size && (total_bytes > max_file_size)) {
- sapi_module.sapi_error(E_WARNING, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not
saved", max_file_size, param, filename);
+#ifdef DEBUG_FILE_UPLOAD
+ sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not
saved", max_file_size, param, filename);
+#endif
cancel_upload = UPLOAD_ERROR_B;
} else if (blen > 0) {
wlen = fwrite(buff, 1, blen, fp);
if (wlen < blen) {
- sapi_module.sapi_error(E_WARNING, "Only %d bytes were written, expected to write
%ld", wlen, blen);
+#ifdef DEBUG_FILE_UPLOAD
+ sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write
%ld", wlen, blen);
+#endif
cancel_upload = UPLOAD_ERROR_C;
} else {
total_bytes += wlen;