Merge pull request #9722 from annando/fix-fatal

Fix fatal
This commit is contained in:
Hypolite Petovan 2020-12-29 21:29:35 -05:00 committed by GitHub
commit d41cb3f3e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,10 @@ class Account extends BaseFactory
$userContact = []; $userContact = [];
} }
if (empty($publicContact)) {
throw new HTTPException\NotFoundException('Contact ' . $contactId . ' not found');
}
$apcontact = APContact::getByURL($publicContact['url'], false); $apcontact = APContact::getByURL($publicContact['url'], false);
$self_contact = Contact::selectFirst(['uid'], ['nurl' => $publicContact['nurl'], 'self' => true]); $self_contact = Contact::selectFirst(['uid'], ['nurl' => $publicContact['nurl'], 'self' => true]);