From e108418824857e670a92f516285455f79bf6e12a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 23 Nov 2013 00:51:29 +0100 Subject: [PATCH] [ticket/11912] Check if content_guesser is supported with function_exists PHPBB3-11912 --- phpBB/phpbb/mimetype/content_guesser.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/mimetype/content_guesser.php b/phpBB/phpbb/mimetype/content_guesser.php index 60e5a905e2..2d74582a21 100644 --- a/phpBB/phpbb/mimetype/content_guesser.php +++ b/phpBB/phpbb/mimetype/content_guesser.php @@ -20,7 +20,7 @@ class content_guesser extends guesser_base */ public function is_supported() { - return true; + return function_exists('mime_content_type'); } /** @@ -28,9 +28,6 @@ class content_guesser extends guesser_base */ public function guess($file, $file_name = '') { - if (function_exists('mime_content_type')) - { - return mime_content_type($file); - } + return mime_content_type($file); } }