Skip to content

Commit a1974e6

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Restore accidentally deleted check
2 parents 105cf92 + b7b0b95 commit a1974e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/dom/node.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,10 @@ static void dom_node_replace_child(INTERNAL_FUNCTION_PARAMETERS, bool modern)
11521152
RETURN_FALSE;
11531153
}
11541154

1155+
if (!nodep->children) {
1156+
RETURN_FALSE;
1157+
}
1158+
11551159
if (!dom_node_check_legacy_insertion_validity(nodep, newchild, stricterror, false)) {
11561160
RETURN_FALSE;
11571161
}

0 commit comments

Comments
 (0)