]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Search/Acl.php
Changed parameter order for getByURL
[friendica.git] / src / Module / Search / Acl.php
index 82880f83c3124c3d388154916650fb992b6630bd..8a5c9faf589177c51d45cd825f383bd66dfb7ea1 100644 (file)
@@ -79,6 +79,11 @@ class Acl extends BaseModule
 
                $contacts = [];
                foreach ($r as $g) {
+                       if (empty($g['name'])) {
+                               DI::logger()->warning('Wrong result item from Search::searchGlobalContact', ['$g' => $g, '$search' => $search, '$mode' => $mode, '$page' => $page]);
+                               continue;
+                       }
+
                        $contacts[] = [
                                'photo'   => ProxyUtils::proxifyUrl($g['photo'], false, ProxyUtils::SIZE_MICRO),
                                'name'    => htmlspecialchars($g['name']),
@@ -345,7 +350,7 @@ class Acl extends BaseModule
                                        continue;
                                }
 
-                               $contact = Contact::getDetailsByURL($author);
+                               $contact = Contact::getByURL($author, false, ['micro', 'name', 'id', 'network', 'nick', 'addr', 'url', 'forum']);
 
                                if (count($contact) > 0) {
                                        $unknown_contacts[] = [