From a5af1408d6f772a52382bdad9e79e93d54bb81f3 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 23 Nov 2022 10:47:51 -0500 Subject: [PATCH] Ward against the possible case that $actor is empty in ActivityPub\Processor::createItem - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1323273452 --- 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 98fed12a3..3f61fe8f1 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -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'];