Merge pull request #11354 from MrPetovan/bug/notices

Check array key existence in ActivityPub\Transmitter::createPermissionBlockForItem
This commit is contained in:
Michael Vogel 2022-03-19 10:56:25 +01:00 committed by GitHub
commit 677cbf8aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,7 +529,7 @@ class Transmitter
$parent = Post::selectFirst(['causer-link', 'post-reason'], ['id' => $item['parent']]); $parent = Post::selectFirst(['causer-link', 'post-reason'], ['id' => $item['parent']]);
if (($parent['post-reason'] == Item::PR_ANNOUNCEMENT) && !empty($parent['causer-link'])) { if (($parent['post-reason'] == Item::PR_ANNOUNCEMENT) && !empty($parent['causer-link'])) {
$profile = APContact::getByURL($parent['causer-link'], false); $profile = APContact::getByURL($parent['causer-link'], false);
$is_forum_thread = ($profile['type'] == 'Group'); $is_forum_thread = isset($profile['type']) && $profile['type'] == 'Group';
} else { } else {
$is_forum_thread = false; $is_forum_thread = false;
} }