Przeglądaj źródła

Merge remote branch 'pborreli/windows-fix-mimetype'

* pborreli/windows-fix-mimetype:
  [HttpFoundation][Windows] Fixed filebinary guesser method.
Fabien Potencier 14 lat temu
rodzic
commit
702e6587ad

+ 4 - 0
src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php

@@ -45,6 +45,10 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
             throw new AccessDeniedException($path);
         }
 
+        if (!self::isSupported()) {
+            return null;
+        }
+        
         ob_start();
 
         // need to use --mime instead of -i. see #6641