mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
we included a check for getimagesize() existance... now we again can suppress notices while running this function.
git-svn-id: file:///svn/phpbb/trunk@7646 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -2956,7 +2956,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
{
|
||||
if ($config['img_link_width'] || $config['img_link_height'])
|
||||
{
|
||||
$dimension = getimagesize($filename);
|
||||
$dimension = @getimagesize($filename);
|
||||
|
||||
// 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]))
|
||||
@@ -3053,7 +3053,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
|
||||
// Macromedia Flash Files
|
||||
case ATTACHMENT_CATEGORY_FLASH:
|
||||
list($width, $height) = getimagesize($filename);
|
||||
list($width, $height) = @getimagesize($filename);
|
||||
|
||||
$l_downloaded_viewed = 'VIEWED_COUNT';
|
||||
|
||||
|
@@ -679,7 +679,7 @@ function get_image_dim($source)
|
||||
if (file_exists(relative_base($source, $relative_path)))
|
||||
{
|
||||
$image = relative_base($source, $relative_path);
|
||||
return getimagesize($image);
|
||||
return @getimagesize($image);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -578,7 +578,7 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||
return false;
|
||||
}
|
||||
|
||||
$dimension = getimagesize($source);
|
||||
$dimension = @getimagesize($source);
|
||||
|
||||
if ($dimension === false)
|
||||
{
|
||||
|
@@ -319,7 +319,7 @@ class filespec
|
||||
{
|
||||
$this->width = $this->height = 0;
|
||||
|
||||
if (($this->image_info = getimagesize($this->destination_file)) !== false)
|
||||
if (($this->image_info = @getimagesize($this->destination_file)) !== false)
|
||||
{
|
||||
$this->width = $this->image_info[0];
|
||||
$this->height = $this->image_info[1];
|
||||
|
@@ -1603,7 +1603,7 @@ function avatar_remote($data, &$error)
|
||||
}
|
||||
|
||||
// Make sure getimagesize works...
|
||||
if (($image_data = getimagesize($data['remotelink'])) === false)
|
||||
if (($image_data = @getimagesize($data['remotelink'])) === false)
|
||||
{
|
||||
$error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
|
||||
return false;
|
||||
|
@@ -280,7 +280,7 @@ class bbcode_firstpass extends bbcode
|
||||
|
||||
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
|
||||
{
|
||||
$stats = getimagesize($in);
|
||||
$stats = @getimagesize($in);
|
||||
|
||||
if ($stats === false)
|
||||
{
|
||||
|
@@ -459,6 +459,18 @@ function compose_pm($id, $mode, $action)
|
||||
confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$subject)
|
||||
{
|
||||
$error[] = $user->lang['EMPTY_MESSAGE_SUBJECT'];
|
||||
}
|
||||
|
||||
if (!$message)
|
||||
{
|
||||
$error[] = $user->lang['TOO_FEW_CHARS'];
|
||||
}
|
||||
}
|
||||
|
||||
unset($subject, $message);
|
||||
}
|
||||
|
Reference in New Issue
Block a user