]> git.mxchange.org Git - friendica.git/commitdiff
Avoid PHP Warning: Illegal string offset 'type' in /src/Protocol/ActivityPub/Receive...
authorMichael <heluecht@pirati.ca>
Mon, 7 Jun 2021 10:21:48 +0000 (10:21 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 7 Jun 2021 10:21:48 +0000 (10:21 +0000)
src/Protocol/ActivityPub/Receiver.php

index 8e1f3853a579f8660814f40a75884e68600f98cb..0a0d37a7cdb331f3c87ce20291a51c7501cd57c8 100644 (file)
@@ -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]);