1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 09:42:22 +01:00

Merge branch 'PHP-7.2' into PHP-7.3

This commit is contained in:
Nikita Popov
2019-10-02 12:07:19 +02:00
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
--TEST--
Using __COMPILER_HALF_OFFSET__ with trailing {} (OSS-Fuzz #17895)
--FILE--
<?php
__COMPILER_HALT_OFFSET__;
{}
--EXPECTF--
Warning: Use of undefined constant __COMPILER_HALT_OFFSET__ - assumed '__COMPILER_HALT_OFFSET__' (this will throw an Error in a future version of PHP) in %s on line %d

View File

@@ -7764,6 +7764,9 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
while (last && last->kind == ZEND_AST_STMT_LIST) {
zend_ast_list *list = zend_ast_get_list(last);
if (list->children == 0) {
break;
}
last = list->child[list->children-1];
}
if (last && last->kind == ZEND_AST_HALT_COMPILER) {