From: Roland Häder Date: Thu, 16 Jun 2022 15:36:32 +0000 (+0200) Subject: Made also this one sweeter (null-coalscing) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=51a7b5c5846c320dd273f5b1005d856416dd1252;p=friendica.git Made also this one sweeter (null-coalscing) --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 1c448cd575..2288427b47 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -1225,8 +1225,7 @@ class Processor $attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id'); $authorid = Contact::getIdForURL($attributed_to); - $value = JsonLD::fetchElement($activity['as:object'], 'as:content', '@value'); - $body = (!empty($value) ? HTML::toBBCode($value) : ''); + $body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value') ?? ''); $messageTags = []; $tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);