Skip to content

Commit 583ba9c

Browse files
author
RedEnchilada
committed
revert debugging commit
1 parent 2244bf3 commit 583ba9c

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

actions/avatarsettings.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ function cropAvatar()
401401

402402
if (!$filedata) {
403403
// TRANS: Server error displayed if an avatar upload went wrong somehow server side.
404-
echo 'Lost our file data.';
405404
$this->serverError(_('Lost our file data.'));
406405
return;
407406
}
@@ -418,22 +417,10 @@ function cropAvatar()
418417
$user = common_current_user();
419418
$profile = $user->getProfile();
420419

421-
try {
422-
$imagefile = new ImageFile($user->id, $filedata['filepath']);
423-
$filename = $imagefile->resize($size, $dest_x, $dest_y, $dest_w, $dest_h);
424-
} catch ($e) {
425-
echo $e->getMessage();
426-
return;
427-
}
428-
429-
$test;
430-
try {
431-
$test = $profile->setOriginal($filename);
432-
} catch ($e) {
433-
echo $e->getMessage();
434-
return;
435-
}
436-
if ($test) {
420+
$imagefile = new ImageFile($user->id, $filedata['filepath']);
421+
$filename = $imagefile->resize($size, $dest_x, $dest_y, $dest_w, $dest_h);
422+
423+
if ($profile->setOriginal($filename)) {
437424
@unlink($filedata['filepath']);
438425
unset($_SESSION['FILEDATA']);
439426
$this->mode = 'upload';

0 commit comments

Comments
 (0)