Skip to content

Commit 247d561

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
2 parents 23db95e + 99c6780 commit 247d561

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Zend/tests/assert/expect_015.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ assert(0 && ($a = function () {
140140
if ($a) {
141141
} elseif ($b) {
142142
}
143+
if ($a); else;
143144
}));
144145

145146
?>
@@ -292,4 +293,7 @@ Warning: assert(): assert(0 && ($a = function () {
292293
if ($a) {
293294
} elseif ($b) {
294295
}
296+
if ($a) {
297+
} else {
298+
}
295299
})) failed in %sexpect_015.php on line %d

Zend/zend_ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static ZEND_COLD void zend_ast_export_if_stmt(smart_str *str, zend_ast_list *lis
12241224
} else {
12251225
zend_ast_export_indent(str, indent);
12261226
smart_str_appends(str, "} else ");
1227-
if (ast->child[1]->kind == ZEND_AST_IF) {
1227+
if (ast->child[1] && ast->child[1]->kind == ZEND_AST_IF) {
12281228
list = (zend_ast_list*)ast->child[1];
12291229
goto tail_call;
12301230
} else {

0 commit comments

Comments
 (0)