diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-10-02 11:17:56 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-10-02 11:17:56 -0700 |
commit | dd55b4b87cb1c89ceeb45ccf49ce648339a86041 (patch) | |
tree | 035059f5f06a2f6595110aff7c620380b46af103 /actions/avatar/upload.php | |
parent | bfdb9bb8a87a29038ba1ae25355684ae19678fdd (diff) | |
parent | ad016fd1254aa03afa7c24fdb82b35faa3c5019f (diff) | |
download | elgg-dd55b4b87cb1c89ceeb45ccf49ce648339a86041.tar.gz elgg-dd55b4b87cb1c89ceeb45ccf49ce648339a86041.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'actions/avatar/upload.php')
-rw-r--r-- | actions/avatar/upload.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/avatar/upload.php b/actions/avatar/upload.php index 19976ea87..885a16557 100644 --- a/actions/avatar/upload.php +++ b/actions/avatar/upload.php @@ -11,6 +11,11 @@ if (!$owner || !($owner instanceof ElggUser) || !$owner->canEdit()) { forward(REFERER); } +if ($_FILES['avatar']['error'] != 0) { + register_error(elgg_echo('avatar:upload:fail')); + forward(REFERER); +} + //@todo make this configurable? $icon_sizes = array( 'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE), @@ -42,7 +47,7 @@ foreach ($icon_sizes as $name => $size_info) { $file->delete(); } - system_message(elgg_echo('avatar:resize:fail')); + register_error(elgg_echo('avatar:resize:fail')); forward(REFERER); } } |