dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Segregate right to edit sitewide CSS/JS"
[lhc/web/wiklou.git]
/
includes
/
Title.php
diff --git
a/includes/Title.php
b/includes/Title.php
index
a364b5b
..
d3e0622
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-306,6
+306,10
@@
class Title implements LinkTarget {
public static function newFromTextThrow( $text, $defaultNamespace = NS_MAIN ) {
if ( is_object( $text ) ) {
throw new MWException( '$text must be a string, given an object' );
public static function newFromTextThrow( $text, $defaultNamespace = NS_MAIN ) {
if ( is_object( $text ) ) {
throw new MWException( '$text must be a string, given an object' );
+ } elseif ( $text === null ) {
+ // Legacy code relies on MalformedTitleException being thrown in this case
+ // (happens when URL with no title in it is parsed). TODO fix
+ throw new MalformedTitleException( 'title-invalid-empty' );
}
$titleCache = self::getTitleCache();
}
$titleCache = self::getTitleCache();