From: Hypolite Petovan Date: Thu, 8 Dec 2022 03:10:38 +0000 (-0500) Subject: Coalesce null activity name in ActivityPub\Processor X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1622ce0a998b99683df6ca0d6e2f36393a179739;p=friendica.git Coalesce null activity name in ActivityPub\Processor - Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783 --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 8e21a66446..60a5c8d741 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -804,7 +804,7 @@ class Processor private static function processContent(array $activity, array $item) { if (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/markdown')) { - $item['title'] = strip_tags($activity['name']); + $item['title'] = strip_tags($activity['name'] ?? ''); $content = Markdown::toBBCode($activity['content']); } elseif (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/bbcode')) { $item['title'] = $activity['name'];