mirror of
https://github.com/friendica/friendica
synced 2025-04-19 11:10:10 +00:00
Fix fallback on unknown contact
This commit is contained in:
parent
caf548e1a7
commit
b8682190de
6 changed files with 9 additions and 9 deletions
|
@ -79,7 +79,7 @@ class AllFriends extends BaseModule
|
|||
$entries = [];
|
||||
foreach ($friends as $friend) {
|
||||
//get further details of the contact
|
||||
$contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid));
|
||||
$contactDetails = Model\Contact::getByURLForUser($friend['url'], $uid) ?: $friend;
|
||||
|
||||
$connlnk = '';
|
||||
// $friend[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photoMenu
|
||||
|
|
|
@ -103,7 +103,7 @@ class Contacts extends BaseProfile
|
|||
continue;
|
||||
}
|
||||
|
||||
$contact_details = array_merge($contact, Contact::getByURLForUser($contact['url'], $a->profile['uid']));
|
||||
$contact_details = Contact::getByURLForUser($contact['url'], $a->profile['uid']) ?: $contact;
|
||||
|
||||
$contacts[] = [
|
||||
'id' => $contact['id'],
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue