mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed constant expressions in array indeces handling
This commit is contained in:
parent
3696e038e5
commit
3810b4ab4a
2 changed files with 7 additions and 5 deletions
|
@ -582,8 +582,11 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
|
|||
}
|
||||
|
||||
if (str_index->gc.u.v.flags & IS_STR_AST) {
|
||||
zend_ast_evaluate(&const_value, (zend_ast *)str_index->val, scope TSRMLS_CC);
|
||||
zend_ast_destroy((zend_ast *)str_index->val);
|
||||
zend_ast_ref *ast = *(zend_ast_ref **)str_index->val;
|
||||
|
||||
zend_ast_evaluate(&const_value, ast->ast, scope TSRMLS_CC);
|
||||
zend_ast_destroy(ast->ast);
|
||||
efree(ast);
|
||||
//???
|
||||
} else if (!zend_get_constant_ex(str_index->val, str_index->len, &const_value, scope, str_index->gc.u.v.flags TSRMLS_CC)) {
|
||||
char *actual, *str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue