Avoid notice when a contact couldn't be fetched
This commit is contained in:
parent
2dc45af57a
commit
2064a2ce87
1 changed files with 3 additions and 0 deletions
|
@ -498,6 +498,9 @@ class Item
|
||||||
// Search for forum mentions
|
// Search for forum mentions
|
||||||
foreach (Tag::getFromBody($item['body'], Tag::TAG_CHARACTER[Tag::MENTION] . Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]) as $tag) {
|
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']);
|
$contact = Contact::getByURLForUser($tag[2], $item['uid']);
|
||||||
|
if (empty($contact)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$receivers[] = $contact['id'];
|
$receivers[] = $contact['id'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue