mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 09:46:46 +02:00
[ticket/11912] Check if content_guesser is supported with function_exists
PHPBB3-11912
This commit is contained in:
@@ -20,17 +20,14 @@ class content_guesser extends guesser_base
|
||||
*/
|
||||
public function is_supported()
|
||||
{
|
||||
return true;
|
||||
return function_exists('mime_content_type');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function guess($file, $file_name = '')
|
||||
{
|
||||
if (function_exists('mime_content_type'))
|
||||
{
|
||||
return mime_content_type($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user