]> git.mxchange.org Git - friendica.git/commitdiff
Fix fatal error
authorMichael <heluecht@pirati.ca>
Tue, 29 Dec 2020 22:14:54 +0000 (22:14 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 29 Dec 2020 22:14:54 +0000 (22:14 +0000)
src/Factory/Api/Mastodon/Account.php

index a2bd550a73b4c92d5d08a99015fe91818eac485e..a459f8d59098552d68362ee8cf6061ec2913faf1 100644 (file)
@@ -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]);