From: Niklas Laxström Date: Tue, 4 Dec 2012 12:35:01 +0000 (+0000) Subject: Treat message cache loading as fatal X-Git-Tag: 1.31.0-rc.0~21429^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=311754120112539f2ad24bb230a9d536b1216802;p=lhc%2Fweb%2Fwiklou.git Treat message cache loading as fatal I suspect this is the primary cause we occasionally have * Sidebar stuck in default values * No gadgets at all * Main page full of occurances Change-Id: I811755d4c250800177c4ea9e509bf6e1d13443a0 --- diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 9bf743667d..f5feaf9b04 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -347,12 +347,12 @@ class MessageCache { } if ( !$success ) { - # Bad luck... this should not happen - $where[] = 'loading FAILED - cache is disabled'; - $info = implode( ', ', $where ); - wfDebug( __METHOD__ . ": Loading $code... $info\n" ); $this->mDisable = true; $this->mCache = false; + // This used to go on, but that led to lots of nasty side + // effects like gadgets and sidebar getting cached with their + // default content + throw new MWException( "MessageCache failed to load messages" ); } else { # All good, just record the success $info = implode( ', ', $where );