}
break;
case ZEND_AST_COALESCE:
- if (ast->child[0]->kind == ZEND_AST_DIM) {
- ast->child[0]->attr = ZEND_DIM_IS;
- }
-
if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) {
ret = FAILURE;
break;
if (Z_TYPE(op1) > IS_NULL) {
*result = op1;
} else {
- if (ast->child[1]->kind == ZEND_AST_DIM) {
- ast->child[1]->attr = ZEND_DIM_IS;
- }
-
if (UNEXPECTED(zend_ast_evaluate(result, ast->child[1], scope) != SUCCESS)) {
zval_dtor(&op1);
ret = FAILURE;
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use [] for reading");
}
- if (ast->attr == ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) {
- ast->child[0]->attr = ZEND_DIM_IS;
- }
-
if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) {
ret = FAILURE;
} else if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) {
zend_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]));
break;
case ZEND_AST_COALESCE:
+ /* Set isset fetch indicator here, opcache disallows runtime altering of the AST */
+ if (ast->child[0]->kind == ZEND_AST_DIM) {
+ ast->child[0]->attr = ZEND_DIM_IS;
+ }
zend_eval_const_expr(&ast->child[0]);
if (ast->child[0]->kind != ZEND_AST_ZVAL) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use [] for reading");
}
+ /* Set isset fetch indicator here, opcache disallows runtime altering of the AST */
+ if (ast->attr == ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) {
+ ast->child[0]->attr = ZEND_DIM_IS;
+ }
+
zend_eval_const_expr(&ast->child[0]);
zend_eval_const_expr(&ast->child[1]);
if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) {