Changed to null-coalscing style (??) as sugguested by @MrPetovan

This commit is contained in:
Roland Häder 2022-06-16 16:59:54 +02:00
parent 962b06bf41
commit 624e4c192c
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77

View file

@ -616,8 +616,8 @@ class Processor
$content = $activity['content'];
} else {
// By default assume "text/html"
$item['title'] = (!empty($activity['name']) ? HTML::toBBCode($activity['name']) : '');
$content = (!empty($activity['content']) ? HTML::toBBCode($activity['content']) : '');
$item['title'] = HTML::toBBCode($activity['name'] ??: '');
$content = HTML::toBBCode($activity['content'] ?? : '');
}
$item['title'] = trim(BBCode::toPlaintext($item['title']));
@ -651,7 +651,7 @@ class Processor
$content = self::removeImplicitMentionsFromBody($content, $parent);
}
$item['content-warning'] = (!empty($activity['summary']) ? HTML::toBBCode($activity['summary']) : '');
$item['content-warning'] = HTML::toBBCode($activity['summary'] ?? '');
$item['raw-body'] = $item['body'] = $content;
}