Page MenuHomePhabricator

Call to finfo_file fails on windows systems
Closed, ResolvedPublic

Description

Author: stefan

Description:
On Windows systems the call to finfo_file in CSSMin.php fails because of the relative path that is passed as argument.

According to http://drupal.org/node/288811 the path must be passed through realpath for finfo_file to work.

Changing line 563 to the following cures the bug on windows:
$type = finfo_file( finfo_open( FILEINFO_MIME_TYPE ), realpath( $file ) );


Version: 1.17.x
Severity: major
OS: Windows 7

Details

Reference
bz25546

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:20 PM
bzimport set Reference to bz25546.

Thanks for doing the research and making the fix easy for me!

Fixed in r74946.

stefan wrote:

You're welcome, but I was confused at first because the exception was only visible when I looked directly at the JS-file with the developertools in Chrome. It would be easier if such exceptions would be presented to the user (if that's possible).