diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2007-03-04 17:21:16 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2007-03-04 17:21:16 +0000 |
| commit | 1ac71c4fe94644571aecd92bf9425e61d3cbf8bb (patch) | |
| tree | a9dfc17644104e879b0befbfdfa3e7674f5f29d6 /ext/standard/array.c | |
| parent | fa29c1a2f55b0655c6db598ec03391dc33d0cd5b (diff) | |
| download | php-git-1ac71c4fe94644571aecd92bf9425e61d3cbf8bb.tar.gz | |
Fixed bug #40709 (array_reduce() behaves strange with one item stored
arrays).
Diffstat (limited to 'ext/standard/array.c')
| -rw-r--r-- | ext/standard/array.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index be3e73c191..29b9e8dc41 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4077,10 +4077,8 @@ PHP_FUNCTION(array_reduce) while (zend_hash_get_current_data_ex(htbl, (void **)&operand, &pos) == SUCCESS) { if (result) { zend_fcall_info fci; - args[0] = &result; args[1] = operand; - fci.size = sizeof(fci); fci.function_table = EG(function_table); fci.function_name = *callback; @@ -4106,7 +4104,7 @@ PHP_FUNCTION(array_reduce) zend_hash_move_forward_ex(htbl, &pos); } - RETVAL_ZVAL(result, 0, 1); + RETVAL_ZVAL(result, 1, 1); } /* }}} */ |
