Merge "Avoid MapCacheLRU error when MessageCache fails to load"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 14 Aug 2018 16:32:07 +0000 (16:32 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 14 Aug 2018 16:32:07 +0000 (16:32 +0000)
includes/cache/MessageCache.php

index 300489c..f09b5bf 100644 (file)
@@ -368,7 +368,7 @@ class MessageCache {
                if ( !$success ) {
                        $where[] = 'loading FAILED - cache is disabled';
                        $this->mDisable = true;
-                       $this->cache->set( $code, null );
+                       $this->cache->set( $code, [] );
                        wfDebugLog( 'MessageCacheError', __METHOD__ . ": Failed to load $code\n" );
                        # This used to throw an exception, but that led to nasty side effects like
                        # the whole wiki being instantly down if the memcached server died