]> git.mxchange.org Git - friendica.git/commitdiff
Avoid notice when a contact couldn't be fetched
authorMichael <heluecht@pirati.ca>
Wed, 8 Jun 2022 05:35:34 +0000 (05:35 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 8 Jun 2022 05:35:34 +0000 (05:35 +0000)
src/Content/Item.php

index 99dda25a031ecd5cf77578a823d7d219352a056b..66dcde0ff3170a32d30f7b8d465de55f8933ca5b 100644 (file)
@@ -498,6 +498,9 @@ class Item
                // Search for forum mentions
                foreach (Tag::getFromBody($item['body'], Tag::TAG_CHARACTER[Tag::MENTION] . Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]) as $tag) {
                        $contact = Contact::getByURLForUser($tag[2], $item['uid']);
+                       if (empty($contact)) {
+                               continue;
+                       }
 
                        $receivers[] = $contact['id'];