From: Reedy Date: Mon, 15 Oct 2012 17:12:10 +0000 (+0100) Subject: Add wfErrorLog() call before throwing an exception in readStyleFile X-Git-Tag: 1.31.0-rc.0~22013^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=4fbbe15778964cc5ec391bc6126ffaf375d69744;p=lhc%2Fweb%2Fwiklou.git Add wfErrorLog() call before throwing an exception in readStyleFile 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 --- diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 7231c0f25d..ec4a14d9c6 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -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 ) {