mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
Merge branch 'PHP-7.2' into PHP-7.3
This commit is contained in:
@@ -12,6 +12,10 @@ PHP NEWS
|
||||
. Fixed bug #76800 (foreach inconsistent if array modified during loop).
|
||||
(Dmitry)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75533 (array_reduce is slow when $carry is large array).
|
||||
(Manabu Matsui)
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #76886 (Can't build xmlrpc with expat). (Thomas Petazzoni, cmb)
|
||||
|
||||
|
||||
@@ -5982,19 +5982,17 @@ PHP_FUNCTION(array_reduce)
|
||||
fci.no_separation = 0;
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(htbl, operand) {
|
||||
ZVAL_COPY(&args[0], &result);
|
||||
ZVAL_COPY_VALUE(&args[0], &result);
|
||||
ZVAL_COPY(&args[1], operand);
|
||||
fci.params = args;
|
||||
|
||||
if (zend_call_function(&fci, &fci_cache) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
|
||||
zval_ptr_dtor(&args[1]);
|
||||
zval_ptr_dtor(&args[0]);
|
||||
zval_ptr_dtor(&result);
|
||||
ZVAL_COPY_VALUE(&result, &retval);
|
||||
} else {
|
||||
zval_ptr_dtor(&args[1]);
|
||||
zval_ptr_dtor(&args[0]);
|
||||
zval_ptr_dtor(&result);
|
||||
return;
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
Reference in New Issue
Block a user