Skip to content

Commit 99c6780

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 915fe2f + 8a9df88 commit 99c6780

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
@@ -1158,7 +1158,7 @@ static ZEND_COLD void zend_ast_export_if_stmt(smart_str *str, zend_ast_list *lis
11581158
} else {
11591159
zend_ast_export_indent(str, indent);
11601160
smart_str_appends(str, "} else ");
1161-
if (ast->child[1]->kind == ZEND_AST_IF) {
1161+
if (ast->child[1] && ast->child[1]->kind == ZEND_AST_IF) {
11621162
list = (zend_ast_list*)ast->child[1];
11631163
goto tail_call;
11641164
} else {

0 commit comments

Comments
 (0)