From d666501ee09720f859c454a3774a59e93d24fa4c Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 29 Dec 2020 22:14:54 +0000 Subject: [PATCH] Fix fatal error --- src/Factory/Api/Mastodon/Account.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Factory/Api/Mastodon/Account.php b/src/Factory/Api/Mastodon/Account.php index a2bd550a73..a459f8d590 100644 --- a/src/Factory/Api/Mastodon/Account.php +++ b/src/Factory/Api/Mastodon/Account.php @@ -67,6 +67,10 @@ class Account extends BaseFactory $userContact = []; } + if (empty($publicContact)) { + throw new HTTPException\NotFoundException('Contact ' . $contactId . ' not found'); + } + $apcontact = APContact::getByURL($publicContact['url'], false); $self_contact = Contact::selectFirst(['uid'], ['nurl' => $publicContact['nurl'], 'self' => true]);