mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-09 09:05:23 +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:
parent
47d3e4d9b8
commit
4c44eddc90
@ -294,7 +294,7 @@ function send_avatar_to_browser($file)
|
||||
{
|
||||
header('Pragma: public');
|
||||
|
||||
$image_data = getimagesize($file_path);
|
||||
$image_data = @getimagesize($file_path);
|
||||
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
||||
|
||||
if (strpos(strtolower($browser), 'msie') !== false)
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ $lang = array_merge($lang, array(
|
||||
'POPUP_ON_PM' => 'Pop up window on new private message',
|
||||
'POST_EDIT_PM' => 'Edit message',
|
||||
'POST_FORWARD_PM' => 'Forward message',
|
||||
'POST_NEW_PM' => 'Post message',
|
||||
'POST_NEW_PM' => 'Compose message',
|
||||
'POST_PM_LOCKED' => 'Private messaging is locked',
|
||||
'POST_PM_POST' => 'Quote post',
|
||||
'POST_QUOTE_PM' => 'Quote message',
|
||||
|
@ -1409,6 +1409,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||
'S_UNREAD_POST' => $post_unread,
|
||||
'S_FIRST_UNREAD' => $s_first_unread,
|
||||
'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
|
||||
'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false,
|
||||
|
||||
'S_IGNORE_POST' => ($row['hide_post']) ? true : false,
|
||||
'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user