From: Tim Starling Date: Wed, 13 Feb 2008 06:13:03 +0000 (+0000) Subject: Title::newMainPage(): don't give a fatal error if the message is broken X-Git-Tag: 1.31.0-rc.0~49493 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=e995c7fecf59931aa11d063d40607468fa473128;p=lhc%2Fweb%2Fwiklou.git Title::newMainPage(): don't give a fatal error if the message is broken --- diff --git a/includes/Title.php b/includes/Title.php index 4c08f85549..8a9d3eee6a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -268,7 +268,12 @@ class Title { * @return Title the new object */ public static function newMainPage() { - return Title::newFromText( wfMsgForContent( 'mainpage' ) ); + $title = Title::newFromText( wfMsgForContent( 'mainpage' ) ); + // Don't give fatal errors if the message is broken + if ( !$title ) { + $title = Title::newFromText( 'Main Page' ); + } + return $title; } /**