1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00
git-svn-id: file:///svn/phpbb/trunk@7503 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-05-07 21:21:40 +00:00
parent 383e27dba8
commit cbb742ea80
3 changed files with 4 additions and 4 deletions

View File

@ -2851,8 +2851,8 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
{
$dimension = getimagesize($filename);
// If the dimensions could not be determined or the image being too small we display it as a link for safety purposes
if ($dimension === false || $dimension[0] < 2 || $dimension[1] < 2)
// If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes
if ($dimension === false || empty($dimension[0]) || empty($dimension[1]))
{
$display_cat = ATTACHMENT_CATEGORY_NONE;
}

View File

@ -580,7 +580,7 @@ function create_thumbnail($source, $destination, $mimetype)
list($width, $height, $type, ) = $dimension;
if ($width < 2 || $height < 2)
if (empty($width) || empty($height))
{
return false;
}

View File

@ -1791,7 +1791,7 @@ function avatar_get_dimensions($avatar, $avatar_type, &$error, $current_x = 0, $
$error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
return false;
}
if ($image_data[0] < 2 || $image_data[1] < 2)
{
$error[] = $user->lang['AVATAR_NO_SIZE'];