jani            Wed Feb  6 19:05:18 2008 UTC

  Modified files:              
    /php-src/ext/filter filter.c 
  Log:
  - Fixed bug in handling arrays which caused the original array being modified 
too.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.90&r2=1.91&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.90 php-src/ext/filter/filter.c:1.91
--- php-src/ext/filter/filter.c:1.90    Fri Jan 25 20:21:18 2008
+++ php-src/ext/filter/filter.c Wed Feb  6 19:05:18 2008
@@ -19,7 +19,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: filter.c,v 1.90 2008/01/25 20:21:18 nlopess Exp $ */
+/* $Id: filter.c,v 1.91 2008/02/06 19:05:18 jani Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -275,7 +275,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_row( 2, "Input Validation and Filtering", 
"enabled" );
-       php_info_print_table_row( 2, "Revision", "$Revision: 1.90 $");
+       php_info_print_table_row( 2, "Revision", "$Revision: 1.91 $");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();
@@ -457,8 +457,9 @@
 
                for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(value), 
&pos);
                         zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), 
(void **) &element, &pos) == SUCCESS;
-                        zend_hash_move_forward_ex(Z_ARRVAL_PP(value), &pos)) {
-
+                        zend_hash_move_forward_ex(Z_ARRVAL_PP(value), &pos)
+               ) {
+                       SEPARATE_ZVAL_IF_NOT_REF(element);
                                if (Z_TYPE_PP(element) == IS_ARRAY) {
                                        Z_ARRVAL_PP(element)->nApplyCount++;
                                        php_zval_filter_recursive(element, 
filter, flags, options, charset, copy TSRMLS_CC);

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

Reply via email to