Fix LESS file dependency tracking in ResourceLoader
authorOri Livneh <ori@wikimedia.org>
Wed, 30 Sep 2015 21:01:01 +0000 (14:01 -0700)
committerOri Livneh <ori@wikimedia.org>
Wed, 30 Sep 2015 21:04:18 +0000 (14:04 -0700)
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

includes/resourceloader/ResourceLoaderFileModule.php

index 5d762d8..a637b93 100644 (file)
@@ -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'];
                        }
                }