From 624e4c192c7f837ac0587a50da6e1409081eb519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Thu, 16 Jun 2022 16:59:54 +0200 Subject: [PATCH] Changed to null-coalscing style (??) as sugguested by @MrPetovan --- src/Protocol/ActivityPub/Processor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 077ba3e3f..311806f8c 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -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; }