[HttpFoundation] Check if required shell functions for FileBinaryMimeTypeGuesser are not disabled

This commit is contained in:
srsbiz 2012-12-31 10:36:11 +01:00 committed by Joseph Bielawski
parent 886f721dc0
commit 3195122905

View File

@ -28,8 +28,9 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
*/
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
*