From a7e576fda0e43a72b77f5584da23b69cd6b2dde3 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 9 Nov 2022 06:31:05 +0000 Subject: [PATCH 1/2] Fix warning: Undefined array key "public" --- src/Factory/Api/Mastodon/Relationship.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)); } } From e9393fb509cd113d1bb52c4ab404ff73ea962793 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 9 Nov 2022 06:38:31 +0000 Subject: [PATCH 2/2] Fix warning when loading invalid html --- src/Worker/CheckRelMeProfileLink.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Worker/CheckRelMeProfileLink.php b/src/Worker/CheckRelMeProfileLink.php index e5727cc83d..987619e19a 100644 --- a/src/Worker/CheckRelMeProfileLink.php +++ b/src/Worker/CheckRelMeProfileLink.php @@ -67,7 +67,7 @@ class CheckRelMeProfileLink Logger::notice('Empty body of the fetched homepage link). Cannot verify the relation to profile of UID %s.', ['uid' => $uid, 'owner homepage' => $owner['homepage']]); } else { $doc = new DOMDocument(); - $doc->loadHTML($content); + @$doc->loadHTML($content); if (!$doc) { Logger::notice('Could not parse the content'); } else {