diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_convert.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_posting.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_upload.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 2 | ||||
-rw-r--r-- | phpBB/includes/message_parser.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 12 |
7 files changed, 19 insertions, 7 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8120a852d0..fee5f49cc1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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'; diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index fba79ae22b..22323a803a 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -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; diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 69318212ea..64612f4ca3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -578,7 +578,7 @@ function create_thumbnail($source, $destination, $mimetype) return false; } - $dimension = getimagesize($source); + $dimension = @getimagesize($source); if ($dimension === false) { diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 93b809f296..68e06765a5 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -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]; diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index a53577d68d..cab9d8bc25 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -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; diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index f5b86b00a6..b8f00d71ee 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -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) { diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index c2dfc8dfb2..7b740c1515 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -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); } |