mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #23104 (hash position of static arrays not being reset)
This commit is contained in:
parent
1345027597
commit
1007b0a826
12
Zend/tests/bug23104.phpt
Normal file
12
Zend/tests/bug23104.phpt
Normal file
@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #23104 (Hash position not reset for constant arrays)
|
||||
--FILE--
|
||||
<?php
|
||||
function foo($bar = array("a", "b", "c"))
|
||||
{
|
||||
var_dump(current($bar));
|
||||
}
|
||||
foo();
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "a"
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user