mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 18:44:26 +02:00
Fix warning "Trying to access array offset on value of type bool"
This commit is contained in:
parent
4917380716
commit
b915252e7e
4 changed files with 18 additions and 3 deletions
|
@ -280,8 +280,8 @@ class Media
|
|||
// When the original picture is potentially animated but the preview isn't, we override the preview
|
||||
if (in_array($media['mimetype'] ?? '', ['image/gif', 'image/png']) && !in_array($imagedata['mime'], ['image/gif', 'image/png'])) {
|
||||
$media['preview'] = $media['url'];
|
||||
$media['preview-width'] = $media['width'];
|
||||
$media['preview-height'] = $media['height'];
|
||||
$media['preview-width'] = $media['width'] ?? $imagedata[0];
|
||||
$media['preview-height'] = $media['height'] ?? $imagedata[1];
|
||||
return $media;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue