From 060936d31e700a2ca65eb1c19f7504b6c4f8a095 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Dec 2022 23:31:32 -0500 Subject: [PATCH] Ward against empty $contact array in Module\Photo::getPhotoById - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349591039 --- src/Module/Photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 5f1d65845..35348be70 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);