Add wfErrorLog() call before throwing an exception in readStyleFile
authorReedy <reedy@wikimedia.org>
Mon, 15 Oct 2012 17:12:10 +0000 (18:12 +0100)
committerReedy <reedy@wikimedia.org>
Mon, 15 Oct 2012 17:12:10 +0000 (18:12 +0100)
Due to the stupid PHP bug, this just gets rendered as a warning.

Then we have no idea what is actually wrong...

Change-Id: I38a2c6df2dc09ef67ff23537f867efa2ce2e3b54

includes/resourceloader/ResourceLoaderFileModule.php

index 7231c0f..ec4a14d 100644 (file)
@@ -620,7 +620,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        protected function readStyleFile( $path, $flip ) {
                $localPath = $this->getLocalPath( $path );
                if ( !file_exists( $localPath ) ) {
-                       throw new MWException( __METHOD__.": style file not found: \"$localPath\"" );
+                       $msg = __METHOD__.": style file not found: \"$localPath\"";
+                       wfErrorLog( $msg, 'resourceloader' );
+                       throw new MWException( $msg );
                }
                $style = file_get_contents( $localPath );
                if ( $flip ) {