diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-07-08 02:17:44 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-07-29 13:01:29 +0200 |
commit | 232e3821cd68fca5910dc047747fabbeabe15697 (patch) | |
tree | 67d63365e9b30d5e1b6f9677e9bd427e0299e020 /apps | |
parent | b186a7822c0ce1c16f8e76d9925d01850d235772 (diff) | |
download | nextcloud-server-232e3821cd68fca5910dc047747fabbeabe15697.tar.gz nextcloud-server-232e3821cd68fca5910dc047747fabbeabe15697.zip |
fix uncaught exception on not permitted file types when setting avatar, fixes #17232
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/user/user.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php index 7f67ebca39b..34960901615 100644 --- a/apps/user_ldap/lib/user/user.php +++ b/apps/user_ldap/lib/user/user.php @@ -343,7 +343,13 @@ class User { } $avatar = $this->avatarManager->getAvatar($this->uid); - $avatar->set($this->image); + try { + $avatar->set($this->image); + } catch (\Exception $e) { + \OC::$server->getLogger()->notice( + 'Could not set avatar for ' . $this->dn . ', because: ' . $e->getMessage(), + ['app' => 'user_ldap']); + } } } |