From: Ori Livneh Date: Wed, 30 Sep 2015 21:01:01 +0000 (-0700) Subject: Fix LESS file dependency tracking in ResourceLoader X-Git-Tag: 1.31.0-rc.0~9627^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=7ac0a3ac59a9a70497cb06ec331a1a54d0665bf3;p=lhc%2Fweb%2Fwiklou.git Fix LESS file dependency tracking in ResourceLoader As Timo noted in a review of I1ff6115, using '+=' to combine file dependencies is incorrect here. I fixed it in one place but not the other, causing the file dependencies to vary based on whether a .lesscache file was used. Change-Id: Ie3f48048febc32c5c2d45acd87e10f946f6dfc94 --- diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 5d762d8d8a..a637b935e6 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -980,7 +980,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { if ( isset( $cachedCompile['hash'] ) ) { $contentHash = FileContentsHasher::getFileContentsHash( $cachedCompile['files'] ); if ( $contentHash === $cachedCompile['hash'] ) { - $this->localFileRefs += $cachedCompile['files']; + $this->localFileRefs = array_merge( $this->localFileRefs, $cachedCompile['files'] ); return $cachedCompile['css']; } }