When title contains only slashes, Title::getRootText() shouldn't return false
[lhc/web/wiklou.git] / includes / Title.php
index a956ca2..7e7153f 100644 (file)
@@ -1770,6 +1770,7 @@ class Title implements LinkTarget, IDBAccessObject {
                if (
                        !MediaWikiServices::getInstance()->getNamespaceInfo()->
                                hasSubpages( $this->mNamespace )
+                       || strtok( $this->getText(), '/' ) === false
                ) {
                        return $this->getText();
                }