From: Ilia Alshanetsky Date: Mon, 4 Aug 2003 17:10:52 +0000 (+0000) Subject: Fixed bug #23104 (hash position of static arrays not being reset) X-Git-Tag: RELEASE_1_2b5~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1007b0a826e6d9cc8d048c95e15ad493ce22d899;p=php Fixed bug #23104 (hash position of static arrays not being reset) --- diff --git a/Zend/tests/bug23104.phpt b/Zend/tests/bug23104.phpt new file mode 100644 index 0000000000..04df3bdeb5 --- /dev/null +++ b/Zend/tests/bug23104.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #23104 (Hash position not reset for constant arrays) +--FILE-- + +--EXPECT-- +string(1) "a" diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 109cf5e305..f55094e066 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -457,6 +457,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) zval_dtor(&const_value); } zend_hash_apply_with_argument(p->value.ht, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC); + zend_hash_internal_pointer_reset(p->value.ht); } return 0; }