From: Aaron Schulz Date: Thu, 2 Feb 2017 22:06:33 +0000 (-0800) Subject: Set mCache in the second MessageCache::loadFromDatabase() caller X-Git-Tag: 1.31.0-rc.0~4157 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=44ac0de8d1d6c4dfdeeb9f52f18f164a18176b46;p=lhc%2Fweb%2Fwiklou.git Set mCache in the second MessageCache::loadFromDatabase() caller The member variable is needed in the next lines, which previously just used the array with "LATEST" set and would be seen as invalid and discarded next time. Bug: T157033 Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a --- diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 9bf0840eeb..4facc20af5 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -584,7 +584,8 @@ class MessageCache { return; } // Load the messages from the master DB to avoid race conditions - $this->loadFromDB( $code, self::FOR_UPDATE ); + $cache = $this->loadFromDB( $code, self::FOR_UPDATE ); + $this->mCache[$code] = $cache; // Load the process cache values and set the per-title cache keys $page = WikiPage::factory( Title::makeTitle( NS_MEDIAWIKI, $title ) ); $page->loadPageData( $page::READ_LATEST );