Skip to content

Commit fb670f2

Browse files
committed
Move setting of CG(zend_lineno)
This way it will also work for zend_ast_create_zval
1 parent 848a6e5 commit fb670f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_compile.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -9995,6 +9995,8 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */
99959995
zval result;
99969996
zend_string *resolved_name;
99979997

9998+
CG(zend_lineno) = zend_ast_get_lineno(ast);
9999+
999810000
resolved_name = zend_resolve_const_name(
999910001
orig_name, name_ast->attr, &is_fully_qualified);
1000010002

@@ -10005,7 +10007,6 @@ static void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */
1000510007
return;
1000610008
}
1000710009

10008-
CG(zend_lineno) = zend_ast_get_lineno(ast);
1000910010
zend_ast_destroy(ast);
1001010011
*ast_ptr = zend_ast_create_constant(resolved_name,
1001110012
!is_fully_qualified && FC(current_namespace) ? IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE : 0);

0 commit comments

Comments
 (0)