cvs: php-src(PHP_5_1) / NEWS /ext/standard array.c
| From: | Dmitry Stogov | Date: | Fri, 28 Oct 2005 09:57:36 +0000 |
| Subject: | cvs: php-src(PHP_5_1) / NEWS /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-34841@lists.php.net to get a copy of this message | ||
dmitry Fri Oct 28 05:57:36 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/standard array.c
Log:
Fixed bug #34982 (array_walk_recursive() modifies elements outside function scope)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.165&r2=1.2027.2.166&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.165 php-src/NEWS:1.2027.2.166
--- php-src/NEWS:1.2027.2.165 Fri Oct 28 04:30:36 2005
+++ php-src/NEWS Fri Oct 28 05:57:32 2005
@@ -4,6 +4,8 @@
- Fixed fgetcsv() and fputcsv() inconsistency. (Dmitry)
- Fixed bug #34996 (ImageTrueColorToPalette() crashes when ncolors is
zero). (Tony)
+- Fixed bug #34982 (array_walk_recursive() modifies elements outside function
+ scope). (Dmitry)
- Fixed bug #34977 (Compile failure on MacOSX due to use of varargs.h). (Tony)
- Fixed bug #34968 (bz2 extension fails on to build on some win32 setups).
(Ilia)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.308.2.9&r2=1.308.2.10&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.9 php-src/ext/standard/array.c:1.308.2.10
--- php-src/ext/standard/array.c:1.308.2.9 Mon Oct 24 02:58:41 2005
+++ php-src/ext/standard/array.c Fri Oct 28 05:57:35 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.9 2005/10/24 06:58:41 dmitry Exp $ */
+/* $Id: array.c,v 1.308.2.10 2005/10/28 09:57:35 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1072,6 +1072,7 @@
if (recursive && Z_TYPE_PP(args[0]) == IS_ARRAY) {
HashTable *thash;
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(args[0]);
thash = HASH_OF(*(args[0]));
if (thash == target_hash) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");