From 2064a2ce87e048b8f4399cd89830bd135127f7ce Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Jun 2022 05:35:34 +0000 Subject: [PATCH] Avoid notice when a contact couldn't be fetched --- src/Content/Item.php | 3 +++ 1 file changed, 3 insertions(+) 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'];