merged branch stloyd/bugfix/mimeguesser_functions (PR #6601)

This PR was merged into the 2.0 branch.

Commits
-------

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

Discussion
----------

[HttpFoundation] Check if required shell functions are not disabled

Rebased to `2.0` & squashed version of #6526.
This commit is contained in:
Fabien Potencier 2013-01-07 17:01:04 +01:00
commit 37c495207b

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
*