From 160a4a65ad70bc67e7a0ebc04d375ebab3452bb2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 12 Dec 2024 21:29:29 +0100 Subject: [PATCH] Export visibility for promoted property (8.3) --- NEWS | 2 ++ Zend/zend_ast.c | 1 + 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 6ac803f4639..856e8845f75 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov) . Fixed bug GH-17162 (zend_array_try_init() with dtor can cause engine UAF). (nielsdos) + . Fixed bug GH-17101 (AST->string does not reproduce constructor property + promotion correctly). (nielsdos) - DBA: . Skip test if inifile is disabled. (orlitzky) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 525d9dfe9a7..bf602449e5e 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -2443,6 +2443,7 @@ simple_list: if (ast->child[3]) { zend_ast_export_attributes(str, ast->child[3], indent, 0); } + zend_ast_export_visibility(str, ast->attr); if (ast->child[0]) { zend_ast_export_type(str, ast->child[0], indent); smart_str_appendc(str, ' ');