From: Timo Tijhof Date: Thu, 6 Aug 2015 05:51:06 +0000 (-0700) Subject: resourceloader: Fix undefined $filename in safeFileHash() X-Git-Tag: 1.31.0-rc.0~10500^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=e68ce73a89bdecc21beb60552be7e72d5e580b83;p=lhc%2Fweb%2Fwiklou.git resourceloader: Fix undefined $filename in safeFileHash() Follows-up 28f6d7fbdee. This was causing versions to stay stuck at their current version. It worked fine for the initial deployment since the rest of the definition summary is still fine, but subsequent deploys that changed only the file were ineffective due to these silently becoming empty strings. Thanks to suppressWarnings() we never saw these anywhere in the tests or in production. Change-Id: Ib4371255fe970442bcc0041219bce633a7f6f6dd --- diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 8e53c3e5b8..ade99e2303 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -857,7 +857,7 @@ abstract class ResourceLoaderModule { */ protected static function safeFileHash( $filePath ) { MediaWiki\suppressWarnings(); - $hash = sha1_file( $filename ) ?: ''; + $hash = sha1_file( $filePath ) ?: ''; MediaWiki\restoreWarnings(); return $hash; }