[COMPONENTS][Avatar] Make sure dimension values are integers

[CARDS][Note] Fix assumed avatar dimension values
This commit is contained in:
Eliseu Amaro 2021-12-26 22:04:55 +00:00
parent 19975b8d8d
commit 20d89f0f24
No known key found for this signature in database
GPG Key ID: 96DA09D4B97BC2D5

View File

@ -119,7 +119,7 @@ class Avatar extends Component
$attachment = self::getAvatar($actor_id)->getAttachment();
return ['width' => (int) $attachment->getWidth(), 'height' => (int) $attachment->getHeight()];
} catch (NoAvatarException) {
return ['width' => Common::config('thumbnail', 'small'), 'height' => Common::config('thumbnail', 'small')];
return ['width' => (int) (Common::config('thumbnail', 'small')), 'height' => (int) (Common::config('thumbnail', 'small'))];
}
}