Ward against empty $contact array in Module\Photo::getPhotoById
- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349591039
This commit is contained in:
parent
0c5158b85d
commit
060936d31e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user