Forward port of https://www.mediawiki.org/wiki/Special:Code/MediaWiki/105964
authorReedy <reedy@wikimedia.org>
Mon, 30 Apr 2012 17:55:38 +0000 (18:55 +0100)
committerCatrope <roan.kattouw@gmail.com>
Mon, 30 Apr 2012 19:13:27 +0000 (12:13 -0700)
"Temporary workaround for bug 31576. The logs show that once every hour or so, a job runner somewhere in the cluster somehow loses all its magic words and starts hitting this case. Throwing an exception should kill the job runner before it does too much damage."

Change-Id: I229e87a5bd323dbc97b85ae470474cc97243c7af

includes/MagicWord.php

index 131ae1d..c304f8a 100644 (file)
@@ -291,8 +291,8 @@ class MagicWord {
                $wgContLang->getMagic( $this );
                if ( !$this->mSynonyms ) {
                        $this->mSynonyms = array( 'dkjsagfjsgashfajsh' );
-                       #throw new MWException( "Error: invalid magic word '$id'" );
-                       wfDebugLog( 'exception', "Error: invalid magic word '$id'\n" );
+                       throw new MWException( "Error: invalid magic word '$id'" );
+                       #wfDebugLog( 'exception', "Error: invalid magic word '$id'\n" );
                }
                wfProfileOut( __METHOD__ );
        }