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:
Stanislav Malyshev 2000-12-07 10:36:10 +00:00
parent 5ff861bd4a
commit 8ba3eeabd9

View File

@ -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);