Skip to content

Commit 0f2c7c5

Browse files
committed
Fix ast export in encaps list
1 parent 311817f commit 0f2c7c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_ast.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,9 +1109,11 @@ static ZEND_COLD void zend_ast_export_encaps_list(smart_str *str, char quote, ze
11091109
ast->child[0]->kind == ZEND_AST_ZVAL &&
11101110
(i + 1 == list->children ||
11111111
list->child[i + 1]->kind != ZEND_AST_ZVAL ||
1112+
(*Z_STRVAL_P(
1113+
zend_ast_get_zval(list->child[i + 1])) != '[' &&
11121114
!zend_ast_valid_var_char(
11131115
*Z_STRVAL_P(
1114-
zend_ast_get_zval(list->child[i + 1]))))) {
1116+
zend_ast_get_zval(list->child[i + 1])))))) {
11151117
zend_ast_export_ex(str, ast, 0, indent);
11161118
} else {
11171119
smart_str_appendc(str, '{');

0 commit comments

Comments
 (0)