dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e476b3
)
Title::newMainPage(): don't give a fatal error if the message is broken
author
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 13 Feb 2008 06:13:03 +0000
(06:13 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 13 Feb 2008 06:13:03 +0000
(06:13 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
4c08f85
..
8a9d3ee
100644
(file)
--- 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;
}
/**