aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Controller/AvatarController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php
index 3b87bf15b2f..5acfe9cd404 100644
--- a/core/Controller/AvatarController.php
+++ b/core/Controller/AvatarController.php
@@ -283,11 +283,12 @@ class AvatarController extends Controller {
$image = new \OC_Image();
$image->loadFromData($tmpAvatar);
- $resp = new DataDisplayResponse($image->data(),
+ $resp = new DataDisplayResponse(
+ $image->data() ?? '',
Http::STATUS_OK,
['Content-Type' => $image->mimeType()]);
- $resp->setETag((string)crc32($image->data()));
+ $resp->setETag((string)crc32($image->data() ?? ''));
$resp->cacheFor(0);
$resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT')));
return $resp;