]> git.mxchange.org Git - friendica.git/commitdiff
Coalesce null activity name in ActivityPub\Processor
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 8 Dec 2022 03:10:38 +0000 (22:10 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 16:38:02 +0000 (11:38 -0500)
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783

src/Protocol/ActivityPub/Processor.php

index 8e21a664469bc7a7e274dcb4bbc01f9e67c84f60..60a5c8d74195716b4917ca75b5210216d7adbafc 100644 (file)
@@ -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'];