]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Profile/Contacts.php
Update function / rearrange tab order
[friendica.git] / src / Module / Profile / Contacts.php
index dde138d8cc93c9a60a956d4c2628da4363533f74..3942ac5d8014fefcf1c4f68c793219ab9e1dabea 100644 (file)
@@ -121,11 +121,14 @@ class Contacts extends Module\BaseProfile
                                        ['uri-id' => $contact['uri-id'], 'uid' => [0, $this->userSession->getLocalUserId()]],
                                        ['order' => ['uid' => 'DESC']]
                                );
-                               return Module\Contact::getContactTemplateVars($contact);
+                               return $contact ? Module\Contact::getContactTemplateVars($contact) : null;
                        },
                        Model\Contact::selectToArray(['uri-id'], $condition, $params)
                );
 
+               // Remove nonexistent contacts
+               $contacts = array_filter($contacts);
+
                $desc = '';
                switch ($type) {
                        case 'followers':