From 1622ce0a998b99683df6ca0d6e2f36393a179739 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 7 Dec 2022 22:10:38 -0500 Subject: [PATCH] Coalesce null activity name in ActivityPub\Processor - Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783 --- src/Protocol/ActivityPub/Processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']; -- 2.39.5