Fix fallback on unknown contact

This commit is contained in:
Michael 2020-07-16 04:18:33 +00:00
parent caf548e1a7
commit b8682190de
6 changed files with 9 additions and 9 deletions

View file

@ -239,7 +239,7 @@ class Index extends BaseSearch
if ($isAddr) {
$contact = Contact::selectFirst(['id'], ['addr' => $search, 'uid' => 0]);
} else {
$contact = array_merge(['id' => 0], Contact::getByURL($search, null, ['id']));
$contact = Contact::getByURL($search, null, ['id']) ?: ['id' => 0];
}
if (DBA::isResult($contact)) {