Obtain MessageBlobStore instance in a consistent way
[lhc/web/wiklou.git] / includes / cache / localisation / LocalisationCache.php
index 1d00d19..db0f380 100644 (file)
@@ -536,7 +536,6 @@ class LocalisationCache {
                        }
                } elseif ( $_fileType == 'aliases' ) {
                        if ( isset( $aliases ) ) {
-                               /** @suppress PhanUndeclaredVariable */
                                $data['aliases'] = $aliases;
                        }
                } else {
@@ -1034,9 +1033,7 @@ class LocalisationCache {
                # HACK: If using a null (i.e. disabled) storage backend, we
                # can't write to the MessageBlobStore either
                if ( $purgeBlobs && !$this->store instanceof LCStoreNull ) {
-                       $blobStore = new MessageBlobStore(
-                               MediaWikiServices::getInstance()->getResourceLoader()
-                       );
+                       $blobStore = MediaWikiServices::getInstance()->getResourceLoader()->getMessageBlobStore();
                        $blobStore->clear();
                }
        }