1
0
Fork 0

Fix fallback on unknown contact

This commit is contained in:
Michael 2020-07-16 04:18:33 +00:00
commit b8682190de
6 changed files with 9 additions and 9 deletions

View file

@ -164,7 +164,7 @@ function display_fetchauthor($a, $item)
$profiledata["about"] = "";
}
$profiledata = array_merge($profiledata, Contact::getByURLForUser($profiledata["url"], local_user()));
$profiledata = Contact::getByURLForUser($profiledata["url"], local_user()) ?: $profiledata;
if (!empty($profiledata["photo"])) {
$profiledata["photo"] = DI::baseUrl()->remove($profiledata["photo"]);

View file

@ -104,7 +104,7 @@ function suggest_content(App $a)
'hide' => [DI::l10n()->t('Ignore/Hide'), $ignlnk]
];
$contact_details = array_merge($rr, Contact::getByURLForUser($rr["url"], local_user()));
$contact_details = Contact::getByURLForUser($rr["url"], local_user()) ?: $rr;
$entry = [
'url' => Contact::magicLink($rr['url']),