Ward against empty $contact array in Module\Photo::getPhotoById

- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349591039
This commit is contained in:
Hypolite Petovan 2022-12-15 23:31:32 -05:00
parent 0c5158b85d
commit 060936d31e

View File

@ -377,7 +377,7 @@ class Photo extends BaseModule
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_SMALL);
}
}
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext, $contact['blurhash'], $customsize, $customsize);
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext, $contact['blurhash'] ?? null, $customsize, $customsize);
case 'header':
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
$contact = Contact::getById($id, $fields);