]> git.mxchange.org Git - friendica.git/commitdiff
Add logging for unexpected Search::searchGlobalContact return in Module\Search\Acl
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 11 Jul 2020 13:19:22 +0000 (09:19 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 11 Jul 2020 13:19:22 +0000 (09:19 -0400)
src/Module/Search/Acl.php

index 82880f83c3124c3d388154916650fb992b6630bd..cc8df3eab2262fc660f4de506326144636bb4f7b 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']),