diff options
Diffstat (limited to 'phpBB/phpbb/avatar/driver/local.php')
| -rw-r--r-- | phpBB/phpbb/avatar/driver/local.php | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index 75c384f31e..f5547c4bc6 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -174,13 +174,15 @@ class local extends \phpbb\avatar\driver\driver  				// Match all images in the gallery folder  				if (preg_match('#^[^&\'"<>]+\.(?:' . implode('|', $this->allowed_extensions) . ')$#i', $image) && is_file($file_path . '/' . $image))  				{ -					if (function_exists('getimagesize')) +					$dims = $this->imagesize->getImageSize($file_path . '/' . $image); + +					if ($dims === false)  					{ -						$dims = getimagesize($file_path . '/' . $image); +						$dims = array(0, 0);  					}  					else  					{ -						$dims = array(0, 0); +						$dims = array($dims['width'], $dims['height']);  					}  					$cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path);  					$avatar_list[$cat][$image] = array( | 
