From d31ff51785f42e3de255722a32f098ab49d1489c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 4 Sep 2014 22:32:08 +0200 Subject: [ticket/13031] Guess with all mimetype guessers and pick best guess PHPBB3-13031 --- phpBB/includes/functions_upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_upload.php') diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index ae04fe737c..f179b2fd70 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -232,9 +232,9 @@ class filespec { if ($this->mimetype_guesser !== null) { - $mimetype = $this->mimetype_guesser->guess($filename); + $mimetype = $this->mimetype_guesser->guess($filename, $this->uploadname); - if (empty($this->mimetype) || $mimetype !== 'application/octet-stream') + if ($mimetype !== 'application/octet-stream') { $this->mimetype = $mimetype; } -- cgit v1.2.1