From 35abf33c0571a1ba444202fdaedb6d929adc6fdc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 18 Feb 2022 20:25:18 -0500 Subject: [PATCH] Check for array content before querying keys in Worker\Notifier - Address https://github.com/friendica/friendica/issues/11218#issuecomment-1045137358 --- src/Worker/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 146bcce9f..488ade222 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -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']); } }