From: Hypolite Petovan Date: Fri, 16 Dec 2022 04:31:32 +0000 (-0500) Subject: Ward against empty $contact array in Module\Photo::getPhotoById X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=060936d31e700a2ca65eb1c19f7504b6c4f8a095;p=friendica.git Ward against empty $contact array in Module\Photo::getPhotoById - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349591039 --- diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 5f1d65845b..35348be707 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -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);