dmitry          Fri Oct 28 05:57:16 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /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.1760.2.507&r2=1.1760.2.508&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.507 php-src/NEWS:1.1760.2.508
--- php-src/NEWS:1.1760.2.507   Wed Oct 26 17:39:20 2005
+++ php-src/NEWS        Fri Oct 28 05:57:12 2005
@@ -6,6 +6,8 @@
 - Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus)
 - 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 #34950 (Unable to get WSDL through proxy). (Dmitry)
 - Fixed bug #34938 (dns_get_record() doesn't resolve long hostnames and 
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.28&r2=1.266.2.29&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.28 
php-src/ext/standard/array.c:1.266.2.29
--- php-src/ext/standard/array.c:1.266.2.28     Tue Oct  4 16:49:35 2005
+++ php-src/ext/standard/array.c        Fri Oct 28 05:57:15 2005
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.266.2.28 2005/10/04 20:49:35 tony2001 Exp $ */
+/* $Id: array.c,v 1.266.2.29 2005/10/28 09:57:15 dmitry Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1050,6 +1050,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");

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to