From 4fbbe15778964cc5ec391bc6126ffaf375d69744 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 15 Oct 2012 18:12:10 +0100 Subject: [PATCH] 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 --- includes/resourceloader/ResourceLoaderFileModule.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ) { -- 2.20.1