From 6c5acf9ee025d2efec375cd98dacd0cad044bc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Jun 2022 18:54:21 +0200 Subject: [PATCH] Fixed: - "Argument 3 passed to Friendica\Model\Photo::createPhotoForExternalResource() must be of the type string, null given --- src/Module/Photo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 341858259f..d1b4b9629e 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -258,7 +258,7 @@ class Photo extends BaseModule return MPhoto::getPhoto($matches[1], $matches[2]); } - return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype']); + return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype'] ?? ''); case 'media': $media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]); if (empty($media)) { @@ -276,7 +276,7 @@ class Photo extends BaseModule return false; } - return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']); + return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype'] ?? ''); case 'contact': $fields = ['uid', 'uri-id', 'url', 'nurl', 'avatar', 'photo', 'xmpp', 'addr', 'network', 'failed', 'updated']; $contact = Contact::getById($id, $fields);