summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2004-03-24 13:31:20 +0000
committerDerick Rethans <derick@php.net>2004-03-24 13:31:20 +0000
commit2face60bef64ac8fa0f7df527450daa60c8ae5aa (patch)
tree20e2fe530486b0be8fe95f32f3ada066e1f7616a
parent7baa132194e636e86686ad2e65b7ab410f5f4990 (diff)
downloadphp-git-2face60bef64ac8fa0f7df527450daa60c8ae5aa.tar.gz
- Fixed NEWS
#- Can we *please* keep this in order?
-rw-r--r--NEWS5
-rw-r--r--Zend/zend_operators.c10
-rw-r--r--main/rfc1867.c12
3 files changed, 15 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index c2ff601052..557a309b74 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,10 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ????? 2004, PHP 5 Release Candidate 2
-- Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)
- (Dmitry, Andi)
-- Changed sqlite's OO API to studlyCaps. (Marcus)
- Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values).
(Marcus)
+- Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)
+ (Dmitry, Andi)
- Fixed bug #27628 (Simplify the process of making a POST request via stream
context). (Ilia)
- Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry)
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index cbc1235659..bb6bb68a30 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -34,8 +34,6 @@
#include "ext/bcmath/number.h"
#endif
-#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
-
ZEND_API int zend_atoi(const char *str, int str_len)
{
int retval;
@@ -727,8 +725,8 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
long lval = op1->value.lval + op2->value.lval;
/* check for overflow by comparing sign bits */
- if ( (op1->value.lval & LONG_SIGN_MASK) == (op2->value.lval & LONG_SIGN_MASK)
- && (op1->value.lval & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) {
+ if ( (op1->value.lval & LONG_MIN) == (op2->value.lval & LONG_MIN)
+ && (op1->value.lval & LONG_MIN) != (lval & LONG_MIN)) {
result->value.dval = (double) op1->value.lval + (double) op2->value.lval;
result->type = IS_DOUBLE;
@@ -767,8 +765,8 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
long lval = op1->value.lval - op2->value.lval;
/* check for overflow by comparing sign bits */
- if ( (op1->value.lval & LONG_SIGN_MASK) != (op2->value.lval & LONG_SIGN_MASK)
- && (op1->value.lval & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) {
+ if ( (op1->value.lval & LONG_MIN) != (op2->value.lval & LONG_MIN)
+ && (op1->value.lval & LONG_MIN) != (lval & LONG_MIN)) {
result->value.dval = (double) op1->value.lval - (double) op2->value.lval;
result->type = IS_DOUBLE;
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 3988a9f330..1370f5b5a6 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -957,16 +957,22 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
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;