From 42b69fc8021cc2f6b800480f8a7230cd421d7aca Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Wed, 6 Feb 2008 19:05:18 +0000 Subject: [PATCH] - Fixed bug in handling arrays which caused the original array being modified too. --- ext/filter/filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 3fe722bd75..1ef6656568 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -457,8 +457,9 @@ static void php_zval_filter_recursive(zval **value, long filter, long flags, zva 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); -- 2.50.1