aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/attachment
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-10-04 11:10:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-09 10:18:41 +0200
commit36ea105236c87e84ca2b9f0a193b5b8721e8cf97 (patch)
tree938da52cb5931f03a5c409a81ab945307761b1e8 /phpBB/phpbb/attachment
parent6c80fd92c6ab4aebb5701e6b1a46c46208d793c9 (diff)
downloadforums-36ea105236c87e84ca2b9f0a193b5b8721e8cf97.tar
forums-36ea105236c87e84ca2b9f0a193b5b8721e8cf97.tar.gz
forums-36ea105236c87e84ca2b9f0a193b5b8721e8cf97.tar.bz2
forums-36ea105236c87e84ca2b9f0a193b5b8721e8cf97.tar.xz
forums-36ea105236c87e84ca2b9f0a193b5b8721e8cf97.zip
[ticket/14168] Move image check and don't use trigger_error()
PHPBB3-14168
Diffstat (limited to 'phpBB/phpbb/attachment')
-rw-r--r--phpBB/phpbb/attachment/upload.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/attachment/upload.php b/phpBB/phpbb/attachment/upload.php
index d57b33b137..ae8d70c18e 100644
--- a/phpBB/phpbb/attachment/upload.php
+++ b/phpBB/phpbb/attachment/upload.php
@@ -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'));
}
}