From: Hypolite Petovan Date: Thu, 8 Dec 2022 14:41:08 +0000 (-0500) Subject: Check for existence of a public contact id before deleting related notifications... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a71fb8d7f3a8cab8dd16be142ce271256ecf99cc;p=friendica.git Check for existence of a public contact id before deleting related notifications in Model\Contact - Address part of https://github.com/friendica/friendica/issues/11993#issuecomment-1338134893 --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 79ddae713a..d3ff4a2ef1 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -3209,8 +3209,9 @@ class Contact self::clearFollowerFollowingEndpointCache($contact['uid']); $cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']); - - DI::notification()->deleteForUserByVerb($contact['uid'], Activity::FOLLOW, ['actor-id' => $cdata['public']]); + if (!empty($cdata['public'])) { + DI::notification()->deleteForUserByVerb($contact['uid'], Activity::FOLLOW, ['actor-id' => $cdata['public']]); + } } /**