com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_c ompile.c

[email protected] (Xinchen Hui)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    2c070847e7a9f88a3c87171fa64dea53f70e1560
Author:    Xinchen Hui <[email protected]>         Mon, 8 May 2017 11:32:27 +0800
Parents:   5dafb523fd20c2d8ce10eabec4f1881a6af8fbe9 87d56a3d07a337269be2e80b67766b4e94120dd8
Branches:  PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=2c070847e7a9f88a3c87171fa64dea53f70e1560

Log:
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())

Bugs:
https://bugs.php.net/74546

Changed paths:
  MM  Zend/zend_compile.c


Diff:
diff --cc Zend/zend_compile.c
index 98e75c5,7fe8815..27d4a7b
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@@ -7370,12 -6669,13 +7370,15 @@@ void zend_compile_class_const(znode *re
  		return;
  	}
  
- 	zend_eval_const_expr(&class_ast);
- 	zend_eval_const_expr(&const_ast);
+ 	zend_eval_const_expr(&ast->child[0]);
+ 	zend_eval_const_expr(&ast->child[1]);
+ 
+ 	class_ast = ast->child[0];
+ 	const_ast = ast->child[1];
  
  	if (class_ast->kind == ZEND_AST_ZVAL) {
 +		zend_string *resolved_name;
 +
  		resolved_name = zend_resolve_class_name_ast(class_ast);
  		if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved_name, zend_ast_get_str(const_ast))) {
  			result->op_type = IS_CONST;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.