Otherwise, Title::makeTitleSafe() will return null, which
breaks the assumption that Title::makeTitleSafe() always
returns something meaningful for strings
returned by Title::getRootText().
Bug: T227816
Change-Id: If79a12bb8d23f1eafc10017d56c62566f39347ad
if (
!MediaWikiServices::getInstance()->getNamespaceInfo()->
hasSubpages( $this->mNamespace )
+ || strtok( $this->getText(), '/' ) === false
) {
return $this->getText();
}
# Title, expected base, optional message
[ 'User:John_Doe/subOne/subTwo', 'John Doe' ],
[ 'User:Foo / Bar / Baz', 'Foo ' ],
+ [ 'Talk:////', '////' ],
+ [ 'Template:////', '////' ],
+ [ 'Template:Foo////', 'Foo' ],
+ [ 'Template:Foo////Bar', 'Foo' ],
];
}