X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FAvatar.php;h=55abc81b33b3850891b6c3ca6ca80ceddd3efdfd;hb=99b1a6f57622099f322b0977c3632924c4df7507;hp=02874b902b5f267e8f94e6e742981c884cb4c07c;hpb=2dfa0bfcee92f5e9ddf6534ee07a7186065a275f;p=quix0rs-gnu-social.git diff --git a/classes/Avatar.php b/classes/Avatar.php index 02874b902b..55abc81b33 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -90,8 +90,8 @@ class Avatar extends Managed_DataObject */ public static function byProfile(Profile $target, $width=null, $height=null) { - $width = (int) floor($width); - $height = !is_null($height) ? (int) floor($height) : null; + $width = intval($width); + $height = !is_null($height) ? intval($height) : null; if (is_null($height)) { $height = $width; } @@ -236,7 +236,7 @@ class Avatar extends Managed_DataObject } static function newSize(Profile $target, $width) { - $width = (int) floor($width); + $width = intval($width); if ($width < 1 || $width > common_config('avatar', 'maxsize')) { // TRANS: An error message when avatar size is unreasonable throw new Exception(_m('Avatar size too large'));