]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0'
authorBob Weinand <bobwei9@hotmail.com>
Thu, 21 Apr 2016 19:51:50 +0000 (21:51 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Thu, 21 Apr 2016 19:51:50 +0000 (21:51 +0200)
1  2 
Zend/zend_compile.c

index af2d2e95cbafa90c81b92995e6ded1259685eb30,fb196f04b54a9b4e9bc7a3de58900d6396e52b21..c99cb686bfad1e5b2c1ffa12782a61ce9fef08e6
@@@ -7864,11 -7385,13 +7864,15 @@@ void zend_eval_const_expr(zend_ast **as
                                return;
                        }
  
 -                      zend_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]));
 +                      if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) {
 +                              return;
 +                      }
                        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) {