Merge pull request #11256 from MrPetovan/bug/notices

Check for array content before querying keys in Worker\Notifier
This commit is contained in:
Tobias Diekershoff 2022-02-19 07:44:17 +01:00 committed by GitHub
commit 32c4d8c565
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,7 +732,7 @@ class Notifier
// Update the locally stored follower list when we deliver to a forum
foreach (Tag::getByURIId($target_item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]) as $tag) {
$target_contact = Contact::getByURL(Strings::normaliseLink($tag['url']), null, [], $uid);
if (($target_contact['contact-type'] == Contact::TYPE_COMMUNITY) && $target_contact['manually-approve']) {
if ($target_contact && $target_contact['contact-type'] == Contact::TYPE_COMMUNITY && $target_contact['manually-approve']) {
Group::updateMembersForForum($target_contact['id']);
}
}