From 5531a25ee0d913f0ee78c45478a8700d3d3af668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 21 Jun 2026 23:01:49 +0200 Subject: [PATCH] zend_ast: Remove duplicated code when exporting arrays Following php/php-src#22350. --- Zend/zend_ast.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 57faedc06f9b..cb27d9b7459c 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1940,11 +1940,10 @@ static ZEND_COLD void zend_ast_export_zval(smart_str *str, const zval *zv, int p } if (key) { zend_ast_export_quoted_str(str, key); - smart_str_appends(str, " => "); } else { smart_str_append_long(str, idx); - smart_str_appends(str, " => "); } + smart_str_appends(str, " => "); zend_ast_export_zval(str, val, 0, indent); } ZEND_HASH_FOREACH_END(); smart_str_appendc(str, ']');