Merge pull request #10377 from annando/warning

Avoid PHP Warning:  Illegal string offset 'type' in /src/Protocol/ActivityPub/Receiver.php on line 668
This commit is contained in:
Hypolite Petovan 2021-06-07 06:51:28 -04:00 committed by GitHub
commit 246aa293d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,7 +665,7 @@ class Receiver
if (!empty($actor)) { if (!empty($actor)) {
$profile = APContact::getByURL($actor); $profile = APContact::getByURL($actor);
$followers = $profile['followers'] ?? ''; $followers = $profile['followers'] ?? '';
$is_forum = $actor['type'] == 'Group'; $is_forum = ($actor['type'] ?? '') == 'Group';
Logger::info('Got actor and followers', ['actor' => $actor, 'followers' => $followers]); Logger::info('Got actor and followers', ['actor' => $actor, 'followers' => $followers]);
} else { } else {
Logger::info('Empty actor', ['activity' => $activity]); Logger::info('Empty actor', ['activity' => $activity]);