summaryrefslogtreecommitdiffstats
path: root/core/avatar/controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/avatar/controller.php')
-rw-r--r--core/avatar/controller.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/avatar/controller.php b/core/avatar/controller.php
index 5264327b641..50ec50f19a5 100644
--- a/core/avatar/controller.php
+++ b/core/avatar/controller.php
@@ -72,12 +72,14 @@ class OC_Core_Avatar_Controller {
} else {
$l = new \OC_L10n('core');
$type = substr($image->mimeType(), -3);
- if ($type === 'peg') { $type = 'jpg'; }
+ if ($type === 'peg') {
+ $type = 'jpg';
+ }
if ($type !== 'jpg' && $type !== 'png') {
\OC_JSON::error(array("data" => array("message" => $l->t("Unknown filetype")) ));
}
- if (!$img->valid()) {
+ if (!$image->valid()) {
\OC_JSON::error(array("data" => array("message" => $l->t("Invalid image")) ));
}
}