From fb670f2b80480cd0dc8a84df99a3f5905994bb3e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 2 Feb 2023 19:55:23 +0100 Subject: [PATCH] Move setting of CG(zend_lineno) This way it will also work for zend_ast_create_zval --- Zend/zend_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 61e87a52919..eb74893886a 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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);