iliaa Fri Aug 8 19:54:26 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard array.c Log: MFH: Fixed bug #24980 (array_reduce() uses first element as default running total). Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.199.2.21 php-src/ext/standard/array.c:1.199.2.22 --- php-src/ext/standard/array.c:1.199.2.21 Tue Jun 17 09:20:18 2003 +++ php-src/ext/standard/array.c Fri Aug 8 19:54:25 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.199.2.21 2003/06/17 13:20:18 iliaa Exp $ */ +/* $Id: array.c,v 1.199.2.22 2003/08/08 23:54:25 iliaa Exp $ */ #include "php.h" #include "php_ini.h" @@ -3208,7 +3208,9 @@ if (ZEND_NUM_ARGS() > 2) { result = *initial; - zval_add_ref(&result); + } else { + MAKE_STD_ZVAL(result); + ZVAL_LONG(result, 0); } /* (zval **)input points to an element of argument stack
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php