Pass a message key to MalformedTitleException constructor
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 20 May 2015 19:44:01 +0000 (15:44 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 20 May 2015 19:44:01 +0000 (15:44 -0400)
'badtitletext' seems to be equivalent to the situation before I4da8ecb4,
so let's go with that.

Bug: T99818
Change-Id: Ifdf66d2806df3ae7d2d378343491dd8976c31981

includes/MediaWiki.php

index 62ab667..58c49f4 100644 (file)
@@ -114,7 +114,7 @@ class MediaWiki {
                        // If we get here, we definitely don't have a valid title; throw an exception.
                        // Try to get detailed invalid title exception first, fall back to MalformedTitleException.
                        Title::newFromTextThrow( $title );
-                       throw new MalformedTitleException( null, $title );
+                       throw new MalformedTitleException( 'badtitletext', $title );
                }
 
                return $ret;