From b548c98abb593f8db1e4563075cfc338279089b6 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 5 Dec 2010 13:38:25 +0000 Subject: [PATCH] (bug 26228) On certain PHP 5.2 installs, finfo functions can be available while FILEINFO_MIME_TYPE is not. Check for the latter explicitly --- includes/libs/CSSMin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1