]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/avatarsettings.php
FormAction wants getInstructions to be protected
[quix0rs-gnu-social.git] / actions / avatarsettings.php
index d3d5b310026416a6875a80caf38b6f062e9de0e6..7373e770477b4a8def01b0ea7ac9db5cdeca3ea6 100644 (file)
@@ -329,7 +329,7 @@ class AvatarsettingsAction extends SettingsAction
                                      'tmp'.common_timestamp());
 
         $filepath = Avatar::path($filename);
-        $imagefile->copyTo($filepath);
+        $imagefile = $imagefile->copyTo($filepath);
 
         $filedata = array('filename' => $filename,
                           'filepath' => $filepath,
@@ -369,7 +369,7 @@ class AvatarsettingsAction extends SettingsAction
         $dest_y = $this->arg('avatar_crop_y') ? $this->arg('avatar_crop_y'):0;
         $dest_w = $this->arg('avatar_crop_w') ? $this->arg('avatar_crop_w'):$file_d;
         $dest_h = $this->arg('avatar_crop_h') ? $this->arg('avatar_crop_h'):$file_d;
-        $size = floor(min($dest_w, $dest_h, MAX_ORIGINAL));
+        $size = intval(min($dest_w, $dest_h, MAX_ORIGINAL));
 
         $user = common_current_user();
         $profile = $user->getProfile();