Add logging for unexpected Search::searchGlobalContact return in Module\Search\Acl

This commit is contained in:
Hypolite Petovan 2020-07-11 09:19:22 -04:00
parent 2af20ea17a
commit e91daf8f46

View 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']),