aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-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'];