mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11912] Check if content_guesser is supported with function_exists
PHPBB3-11912
This commit is contained in:
parent
df6e03266f
commit
e108418824
1 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue