diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/AvatarController.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index c01e81a1790..0d0a0274414 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -285,7 +285,8 @@ class AvatarController extends Controller { Http::STATUS_NOT_FOUND); } - $image = new \OC_Image($tmpAvatar); + $image = new \OC_Image(); + $image->loadFromData($tmpAvatar); $resp = new DataDisplayResponse($image->data(), Http::STATUS_OK, @@ -322,7 +323,8 @@ class AvatarController extends Controller { Http::STATUS_BAD_REQUEST); } - $image = new \OC_Image($tmpAvatar); + $image = new \OC_Image(); + $image->loadFromData($tmpAvatar); $image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h'])); try { $avatar = $this->avatarManager->getAvatar($this->userId); |