From 54e750ba7845d0333cdb0fdccdb54f1432b2c161 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 11 Mar 2016 13:44:35 +0100 Subject: dont die when we cant save the resized avatar, log instead --- lib/private/avatarmanager.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/private/avatarmanager.php') diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php index 3b619cda574..62f4faf436c 100644 --- a/lib/private/avatarmanager.php +++ b/lib/private/avatarmanager.php @@ -28,6 +28,7 @@ namespace OC; use OCP\Files\Folder; use OCP\Files\NotFoundException; use OCP\IAvatarManager; +use OCP\ILogger; use OCP\IUserManager; use OCP\Files\IRootFolder; use OCP\IL10N; @@ -46,20 +47,26 @@ class AvatarManager implements IAvatarManager { /** @var IL10N */ private $l; + /** @var ILogger */ + private $logger; + /** * AvatarManager constructor. * * @param IUserManager $userManager * @param IRootFolder $rootFolder * @param IL10N $l + * @param ILogger $logger */ public function __construct( IUserManager $userManager, IRootFolder $rootFolder, - IL10N $l) { + IL10N $l, + ILogger $logger) { $this->userManager = $userManager; $this->rootFolder = $rootFolder; $this->l = $l; + $this->logger = $logger; } /** @@ -85,6 +92,6 @@ class AvatarManager implements IAvatarManager { /** @var Folder $folder */ $folder = $this->rootFolder->get($dir); - return new Avatar($folder, $this->l, $user); + return new Avatar($folder, $this->l, $user, $this->logger); } } -- cgit v1.2.3