aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r--phpBB/includes/functions_upload.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index f70e20e616..f3ae9d6cc4 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -151,7 +151,10 @@ class filespec
*/
function is_image()
{
- return (strpos($this->mimetype, 'image/') !== false) ? true : false;
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ $mimetype = $finfo->file($this->filename);
+
+ return (strpos($mimetype, 'image/') !== false) ? true : false;
}
/**
@@ -342,6 +345,7 @@ class filespec
// Remove temporary filename
@unlink($this->filename);
+ $this->filename = $this->destination_file;
if (sizeof($this->error))
{