summaryrefslogtreecommitdiffstats
path: root/lib/private/Avatar.php
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom@ssji.net>2016-09-29 21:51:07 +1000
committerMorris Jobke <hey@morrisjobke.de>2016-10-24 11:27:27 +0200
commit19ad058d0676819536953074091d915dfec8e39f (patch)
tree6e999b5d9217be06b67961d3f62d6fe3adde9582 /lib/private/Avatar.php
parentf054adb4291c83b05777688360780146af5f7d94 (diff)
downloadnextcloud-server-19ad058d0676819536953074091d915dfec8e39f.tar.gz
nextcloud-server-19ad058d0676819536953074091d915dfec8e39f.zip
Add message to NotSquareException thrown from Avatar
This prevents cryptic messages such as the following, from `user_ldap`: Could not set avatar for uid=user,ou=People,dc=example,dc=net, because: Signed-off-by: Olivier Mehani <shtrom@ssji.net> Add message to NotPermittedException thrown from Files\Nodes\Folder Ditto. Don't use translation macros here as this seems to be pretty low-level errors that generally get caught and prettified, and I don't want to unduly clog down the lower layers. Signed-off-by: Olivier Mehani <shtrom@ssji.net> fixup! Add message to NotPermittedException thrown from Files\Nodes\Folder
Diffstat (limited to 'lib/private/Avatar.php')
-rw-r--r--lib/private/Avatar.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php
index c3a068701df..fc1909c3bda 100644
--- a/lib/private/Avatar.php
+++ b/lib/private/Avatar.php
@@ -131,7 +131,7 @@ class Avatar implements IAvatar {
}
if (!($img->height() === $img->width())) {
- throw new NotSquareException();
+ throw new NotSquareException($this->l->t("Avatar image is not square"));
}
$this->remove();