(bug 26228) On certain PHP 5.2 installs, finfo functions can be available while FILEI...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 5 Dec 2010 13:38:25 +0000 (13:38 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 5 Dec 2010 13:38:25 +0000 (13:38 +0000)
includes/libs/CSSMin.php

index af45042..b6dad93 100644 (file)
@@ -111,7 +111,8 @@ class CSSMin {
                                // Try a couple of different ways to get the mime-type of a file,
                                // in order of preference
                                if ( $realpath
-                                       && function_exists( 'finfo_file' ) && function_exists( 'finfo_open' ) )
+                                       && function_exists( 'finfo_file' ) && function_exists( 'finfo_open' )
+                                       && defined( 'FILEINFO_MIME_TYPE' ) )
                                {
                                        // As of PHP 5.3, this is how you get the mime-type of a file;
                                        // it uses the Fileinfo PECL extension