Skip to content

Commit 2f8405c

Browse files
committed
Fix ZEND_NAME_ for new class name in const expr
When we have a fetch type, the name is "NOT_FQ". In practice, this just omits the leading \.
1 parent 74b524f commit 2f8405c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11233,7 +11233,7 @@ static void zend_compile_const_expr_new(zend_ast **ast_ptr)
1123311233
zval *class_ast_zv = zend_ast_get_zval(class_ast);
1123411234
zval_ptr_dtor_nogc(class_ast_zv);
1123511235
ZVAL_STR(class_ast_zv, class_name);
11236-
class_ast->attr = fetch_type << ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT;
11236+
class_ast->attr = (fetch_type << ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT) | (fetch_type ? ZEND_NAME_NOT_FQ : ZEND_NAME_FQ);
1123711237
}
1123811238

1123911239
static void zend_compile_const_expr_closure(zend_ast **ast_ptr)

0 commit comments

Comments
 (0)