From: Michael Date: Mon, 7 Jun 2021 10:21:48 +0000 (+0000) Subject: Avoid PHP Warning: Illegal string offset 'type' in /src/Protocol/ActivityPub/Receive... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=265137ef44032e30f968b6bdb1a6d21990d1dfdb;p=friendica.git Avoid PHP Warning: Illegal string offset 'type' in /src/Protocol/ActivityPub/Receiver.php on line 668 --- diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 8e1f3853a5..0a0d37a7cd 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -665,7 +665,7 @@ class Receiver if (!empty($actor)) { $profile = APContact::getByURL($actor); $followers = $profile['followers'] ?? ''; - $is_forum = $actor['type'] == 'Group'; + $is_forum = ($actor['type'] ?? '') == 'Group'; Logger::info('Got actor and followers', ['actor' => $actor, 'followers' => $followers]); } else { Logger::info('Empty actor', ['activity' => $activity]);