From: Hypolite Petovan Date: Sat, 11 Jul 2020 13:19:22 +0000 (-0400) Subject: Add logging for unexpected Search::searchGlobalContact return in Module\Search\Acl X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e91daf8f46c298360c1d1d5dea8dbe0653c36248;p=friendica.git Add logging for unexpected Search::searchGlobalContact return in Module\Search\Acl --- diff --git a/src/Module/Search/Acl.php b/src/Module/Search/Acl.php index 82880f83c3..cc8df3eab2 100644 --- a/src/Module/Search/Acl.php +++ b/src/Module/Search/Acl.php @@ -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']),