From a3d80d71e5bc8b0c7fe2cc56a6a219959d0d2e15 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 18 Oct 2010 14:59:42 +0000 Subject: [PATCH] (bug 25546) Feed argument to finfo_file() through readpath() so it'll work on Windows --- includes/libs/CSSMin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 44e5ba9786..081482be68 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -102,7 +102,7 @@ class CSSMin { // Try a couple of different ways to get the mime-type of a file, in order of preference if ( function_exists( 'finfo_file' ) && function_exists( 'finfo_open' ) ) { // As of PHP 5.3, this is how you get the mime-type of a file; it uses the Fileinfo PECL extension - $type = finfo_file( finfo_open( FILEINFO_MIME_TYPE ), $file ); + $type = finfo_file( finfo_open( FILEINFO_MIME_TYPE ), realpath( $file ) ); } else if ( function_exists( 'mime_content_type' ) ) { // Before this was deprecated in PHP 5.3, this used to be how you get the mime-type of a file $type = mime_content_type( $file ); -- 2.20.1