Skip nonexistent contacts in Pofile/Contacts
- Address part of https://github.com/friendica/friendica/issues/12486#issuecomment-1428489772
This commit is contained in:
parent
8ab5fddafd
commit
2fdf39e8b8
1 changed files with 4 additions and 1 deletions
|
@ -121,11 +121,14 @@ class Contacts extends Module\BaseProfile
|
||||||
['uri-id' => $contact['uri-id'], 'uid' => [0, $this->userSession->getLocalUserId()]],
|
['uri-id' => $contact['uri-id'], 'uid' => [0, $this->userSession->getLocalUserId()]],
|
||||||
['order' => ['uid' => 'DESC']]
|
['order' => ['uid' => 'DESC']]
|
||||||
);
|
);
|
||||||
return Module\Contact::getContactTemplateVars($contact);
|
return $contact ? Module\Contact::getContactTemplateVars($contact) : null;
|
||||||
},
|
},
|
||||||
Model\Contact::selectToArray(['uri-id'], $condition, $params)
|
Model\Contact::selectToArray(['uri-id'], $condition, $params)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove nonexistent contacts
|
||||||
|
$contacts = array_filter($contacts);
|
||||||
|
|
||||||
$desc = '';
|
$desc = '';
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'followers':
|
case 'followers':
|
||||||
|
|
Loading…
Reference in a new issue