From: Michael Date: Wed, 8 Jun 2022 05:35:34 +0000 (+0000) Subject: Avoid notice when a contact couldn't be fetched X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2064a2ce87e048b8f4399cd89830bd135127f7ce;p=friendica.git Avoid notice when a contact couldn't be fetched --- diff --git a/src/Content/Item.php b/src/Content/Item.php index 99dda25a03..66dcde0ff3 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -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'];