From: Michael Date: Wed, 9 Nov 2022 06:31:05 +0000 (+0000) Subject: Fix warning: Undefined array key "public" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7e576fda0e43a72b77f5584da23b69cd6b2dde3;p=friendica.git Fix warning: Undefined array key "public" --- diff --git a/src/Factory/Api/Mastodon/Relationship.php b/src/Factory/Api/Mastodon/Relationship.php index 6d78b50c21..9d11f58956 100644 --- a/src/Factory/Api/Mastodon/Relationship.php +++ b/src/Factory/Api/Mastodon/Relationship.php @@ -39,12 +39,13 @@ class Relationship extends BaseFactory { $cdata = Contact::getPublicAndUserContactID($contactId, $uid); if (!empty($cdata)) { - $cid = $cdata['user']; + $cid = $cdata['user']; + $pcid = $cdata['public']; } else { - $cid = $contactId; + $pcid = $cid = $contactId; } - return new RelationshipEntity($cdata['public'], Contact::getById($cid), + return new RelationshipEntity($pcid, Contact::getById($cid), Contact\User::isBlocked($cid, $uid), Contact\User::isIgnored($cid, $uid)); } }