[HttpFoundation] Check if required shell functions for FileBinaryMimeTypeGuesser
are not disabled
This commit is contained in:
parent
886f721dc0
commit
3195122905
@ -28,8 +28,9 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
|
|||||||
*/
|
*/
|
||||||
public static function isSupported()
|
public static function isSupported()
|
||||||
{
|
{
|
||||||
return !strstr(PHP_OS, 'WIN');
|
return !defined('PHP_WINDOWS_VERSION_BUILD') && function_exists('passthru') && function_exists('escapeshellarg');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Guesses the mime type of the file with the given path
|
* Guesses the mime type of the file with the given path
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user