1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Move setting of CG(zend_lineno)

This way it will also work for zend_ast_create_zval
This commit is contained in:
Ilija Tovilo
2023-02-02 19:55:23 +01:00
parent 848a6e5035
commit fb670f2b80

View File

@@ -9995,6 +9995,8 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */
zval result;
zend_string *resolved_name;
CG(zend_lineno) = zend_ast_get_lineno(ast);
resolved_name = zend_resolve_const_name(
orig_name, name_ast->attr, &is_fully_qualified);
@@ -10005,7 +10007,6 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */
return;
}
CG(zend_lineno) = zend_ast_get_lineno(ast);
zend_ast_destroy(ast);
*ast_ptr = zend_ast_create_constant(resolved_name,
!is_fully_qualified && FC(current_namespace) ? IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE : 0);