diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index f2ad711b6d..ce876e67eb 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4682,14 +4682,22 @@ public function toAvatar($userData = null, $options = array()) $image = (!empty($userData['user_image'])) ? varset($userData['user_image']) : null; $genericFile = e_IMAGE . 'generic/blank_avatar.jpg'; - $genericImg = $tp->thumbUrl($genericFile, 'w=' . $width . '&h=' . $height, true, $full); + $genericImg = $tp->thumbUrl($genericFile, 'w=' . $width . '&h=' . $height, false, $full); if (!empty($image)) { if (strpos($image, '://') !== false) // Remote Image { - $url = $image; + if (@fopen($image, 'r')) + { + $url = $image; + } + else + { + $file = $genericFile; + $url = $genericImg; + } } elseif (strpos($image, '-upload-') === 0) {