fix(avatar): handle null bodies

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst
2025-07-01 13:23:24 +02:00
parent 3a7babefc2
commit b8f452bba2

View File

@ -56,7 +56,7 @@ class GravatarSource implements IAvatarSource {
if (is_resource($body)) {
$body = stream_get_contents($body);
}
if (strlen($body) === 0) {
if ($body === null || strlen($body) === 0) {
return null;
}