From e91daf8f46c298360c1d1d5dea8dbe0653c36248 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 11 Jul 2020 09:19:22 -0400 Subject: [PATCH] Add logging for unexpected Search::searchGlobalContact return in Module\Search\Acl --- src/Module/Search/Acl.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Module/Search/Acl.php b/src/Module/Search/Acl.php index 82880f83c..cc8df3eab 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']),