1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/14168] Move image check and don't use trigger_error()

PHPBB3-14168
This commit is contained in:
Marc Alexander
2015-10-04 11:10:07 +02:00
parent 6c80fd92c6
commit 36ea105236
3 changed files with 158 additions and 9 deletions

View File

@@ -160,6 +160,9 @@ class upload
// Do we have to create a thumbnail?
$this->file_data['thumbnail'] = ($is_image && $this->config['img_create_thumbnail']) ? 1 : 0;
// Make sure the image category only holds valid images...
$this->check_image($is_image);
if (sizeof($this->file->error))
{
$this->file->remove();
@@ -169,9 +172,6 @@ class upload
return $this->file_data;
}
// Make sure the image category only holds valid images...
$this->check_image($is_image);
$this->fill_file_data();
$filedata = $this->file_data;
@@ -263,7 +263,7 @@ class upload
// If this error occurs a user tried to exploit an IE Bug by renaming extensions
// Since the image category is displaying content inline we need to catch this.
trigger_error($this->language->lang('ATTACHED_IMAGE_NOT_IMAGE'));
$this->file->set_error($this->language->lang('ATTACHED_IMAGE_NOT_IMAGE'));
}
}