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:
8
Zend/tests/halt_compiler5.phpt
Normal file
8
Zend/tests/halt_compiler5.phpt
Normal 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
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user