Fixed:
- "Argument 3 passed to Friendica\Model\Photo::createPhotoForExternalResource() must be of the type string, null given
This commit is contained in:
parent
ff9707713b
commit
6c5acf9ee0
1 changed files with 2 additions and 2 deletions
|
@ -258,7 +258,7 @@ class Photo extends BaseModule
|
||||||
return MPhoto::getPhoto($matches[1], $matches[2]);
|
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':
|
case 'media':
|
||||||
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]);
|
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]);
|
||||||
if (empty($media)) {
|
if (empty($media)) {
|
||||||
|
@ -276,7 +276,7 @@ class Photo extends BaseModule
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']);
|
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype'] ?? '');
|
||||||
case 'contact':
|
case 'contact':
|
||||||
$fields = ['uid', 'uri-id', 'url', 'nurl', 'avatar', 'photo', 'xmpp', 'addr', 'network', 'failed', 'updated'];
|
$fields = ['uid', 'uri-id', 'url', 'nurl', 'avatar', 'photo', 'xmpp', 'addr', 'network', 'failed', 'updated'];
|
||||||
$contact = Contact::getById($id, $fields);
|
$contact = Contact::getById($id, $fields);
|
||||||
|
|
Loading…
Reference in a new issue