]> git.mxchange.org Git - friendica.git/commitdiff
Ward against the possible case that $actor is empty in ActivityPub\Processor::createItem
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 15:47:51 +0000 (10:47 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 15:47:51 +0000 (10:47 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1323273452

src/Protocol/ActivityPub/Processor.php

index 98fed12a33838a11417e19bd0703ba99fdffaa07..3f61fe8f12d399856fcee66068168c58957f2e2a 100644 (file)
@@ -431,7 +431,7 @@ class Processor
                        $item['owner-id'] = $item['author-id'];
                } else {
                        $actor = APContact::getByURL($item['owner-link'], false);
-                       $item['isForum'] = ($actor['type'] == 'Group');
+                       $item['isForum'] = ($actor['type'] ?? 'Person') == 'Group';
                }
 
                $item['uri'] = $activity['id'];