Patch bug65304.patch for Arrays related Bug #65304
Patch version 2013-07-21 12:11 UTC
Return to Bug #65304 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e218dc0..0eaca16 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -4037,17 +4037,7 @@ PHP_FUNCTION(array_sum)
entry_n = **entry;
zval_copy_ctor(&entry_n);
convert_scalar_to_number(&entry_n TSRMLS_CC);
-
- if (Z_TYPE(entry_n) == IS_LONG && Z_TYPE_P(return_value) == IS_LONG) {
- dval = (double)Z_LVAL_P(return_value) + (double)Z_LVAL(entry_n);
- if ( (double)LONG_MIN <= dval && dval <= (double)LONG_MAX ) {
- Z_LVAL_P(return_value) += Z_LVAL(entry_n);
- continue;
- }
- }
- convert_to_double(return_value);
- convert_to_double(&entry_n);
- Z_DVAL_P(return_value) += Z_DVAL(entry_n);
+ fast_add_function(return_value, return_value, &entry_n TSRMLS_CC);
}
}
/* }}} */
|