aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-07-17 15:41:16 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-07-17 15:41:16 +0000
commitcc42f6ed22ceb531db5ce25fdcf2140c7e5509f7 (patch)
tree39c0ebc5acfe98c77992f9d71b4cb51778fe9829 /phpBB/includes/functions_user.php
parentc9940c581ed64cf59e019b35282cae439497839a (diff)
downloadforums-cc42f6ed22ceb531db5ce25fdcf2140c7e5509f7.tar
forums-cc42f6ed22ceb531db5ce25fdcf2140c7e5509f7.tar.gz
forums-cc42f6ed22ceb531db5ce25fdcf2140c7e5509f7.tar.bz2
forums-cc42f6ed22ceb531db5ce25fdcf2140c7e5509f7.tar.xz
forums-cc42f6ed22ceb531db5ce25fdcf2140c7e5509f7.zip
Well, seems that many hosts are in a business in which they shouldn't be in. Lessen the impact for their customers by allowing to do without getimagesize for remote avatatars.
#13531 git-svn-id: file:///svn/phpbb/trunk@7899 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8750ca91a0..d9ed7980f2 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1820,13 +1820,13 @@ function avatar_remote($data, &$error)
}
// Make sure getimagesize works...
- if (($image_data = @getimagesize($data['remotelink'])) === false)
+ if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height'])))
{
$error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
return false;
}
- if ($image_data[0] < 2 || $image_data[1] < 2)
+ if (!empty($image_data) && ($image_data[0] < 2 || $image_data[1] < 2))
{
$error[] = $user->lang['AVATAR_NO_SIZE'];
return false;
@@ -1846,7 +1846,7 @@ function avatar_remote($data, &$error)
$types = fileupload::image_types();
$extension = strtolower(filespec::get_extension($data['remotelink']));
- if (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]]))
+ if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
{
if (!isset($types[$image_data[2]]))
{