diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/standard/array.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -28,6 +28,8 @@ PHP NEWS data connection). (Ville Hukkamäki) . Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with stream_socket_client). (Ville Hukkamäki) + . 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) diff --git a/ext/standard/array.c b/ext/standard/array.c index 1882648858..dfff41b6aa 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -5965,19 +5965,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(); |