fix uncaught exception on not permitted file types when setting avatar, fixes #17232

This commit is contained in:
Arthur Schiwon 2015-07-08 02:17:44 +02:00
parent 85b7bde7d4
commit b37d62d9d3

View file

@ -342,7 +342,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']);
}
}
}