CommentItem: Fix warning when the comment is empty

Bug: T302927
Change-Id: I5e92a71327e9563adb2427da62647a21244b803c
This commit is contained in:
Bartosz Dziewoński 2022-03-03 17:14:25 +01:00
parent 6e75e580a9
commit 0c59779126

View file

@ -75,8 +75,8 @@ class CommentItem extends ThreadItem {
// Find a trailing text node
$lastChild = $fragment->lastChild;
while (
!( $lastChild instanceof Text ) &&
$lastChild->lastChild
$lastChild &&
!( $lastChild instanceof Text )
) {
$lastChild = $lastChild->lastChild;
}