mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Allow var $foo = array(ABC => 1) constructs
# It still doesn't work good with constants, but at least doesn't leak now
This commit is contained in:
parent
5ff861bd4a
commit
8ba3eeabd9
@ -1791,6 +1791,7 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr)
|
||||
*element = expr->u.constant;
|
||||
if (offset) {
|
||||
switch (offset->u.constant.type) {
|
||||
case IS_CONSTANT:
|
||||
case IS_STRING:
|
||||
zend_hash_update(result->u.constant.value.ht, offset->u.constant.value.str.val, offset->u.constant.value.str.len+1, &element, sizeof(zval *), NULL);
|
||||
zval_dtor(&offset->u.constant);
|
||||
|
Loading…
Reference in New Issue
Block a user