aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-07 21:21:40 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-07 21:21:40 +0000
commitcbb742ea8073a35fe812ba9da97faed2b8612d61 (patch)
treeef487e255b57a5f76b27be32b0e583e09fd94f8f
parent383e27dba8057fbbafc83590bc6a98ce774b8634 (diff)
downloadforums-cbb742ea8073a35fe812ba9da97faed2b8612d61.tar
forums-cbb742ea8073a35fe812ba9da97faed2b8612d61.tar.gz
forums-cbb742ea8073a35fe812ba9da97faed2b8612d61.tar.bz2
forums-cbb742ea8073a35fe812ba9da97faed2b8612d61.tar.xz
forums-cbb742ea8073a35fe812ba9da97faed2b8612d61.zip
#10617
git-svn-id: file:///svn/phpbb/trunk@7503 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions.php4
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/functions_user.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 41023816af..c7d77da408 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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;
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4b8890178a..06ca808d9c 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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;
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 079a2d3e77..0dab76e7c0 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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'];