]> git.mxchange.org Git - friendica.git/commitdiff
Check for array content before querying keys in Worker\Notifier
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 19 Feb 2022 01:25:18 +0000 (20:25 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 19 Feb 2022 01:25:18 +0000 (20:25 -0500)
- Address https://github.com/friendica/friendica/issues/11218#issuecomment-1045137358

src/Worker/Notifier.php

index 146bcce9f102716b7122f4a0d10f868ce118b970..488ade22297d9e84c18781b3f13b821f3e5d7fab 100644 (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']);
                        }
                }