From: Roan Kattouw Date: Sun, 5 Dec 2010 13:38:25 +0000 (+0000) Subject: (bug 26228) On certain PHP 5.2 installs, finfo functions can be available while FILEI... X-Git-Tag: 1.31.0-rc.0~33548 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=b548c98abb593f8db1e4563075cfc338279089b6;p=lhc%2Fweb%2Fwiklou.git (bug 26228) On certain PHP 5.2 installs, finfo functions can be available while FILEINFO_MIME_TYPE is not. Check for the latter explicitly --- diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index af45042318..b6dad93e53 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -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