Use another method of detecting unspecified defaultImage size

This commit is contained in:
Mikael Nordfeldth 2016-03-01 15:00:52 +01:00
parent 63c087a255
commit a112e7f9a4
1 changed files with 4 additions and 1 deletions

View File

@ -207,8 +207,11 @@ class Avatar extends Managed_DataObject
} }
} }
static function defaultImage($size=AVATAR_PROFILE_SIZE) static function defaultImage($size=null)
{ {
if (is_null($size)) {
$size = AVATAR_PROFILE_SIZE;
}
static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile',
AVATAR_STREAM_SIZE => 'stream', AVATAR_STREAM_SIZE => 'stream',
AVATAR_MINI_SIZE => 'mini'); AVATAR_MINI_SIZE => 'mini');