/** * #1416 create container manually to avoid any issues that may arise from * a failed Title::makeTitleSafe. */ private function newDIContainer(Query $query) { $subject = $query->getContextPage(); if ($subject === null) { $containerSemanticData = ContainerSemanticData::makeAnonymousContainer(); } else { $subject = new DIWikiPage($subject->getDBkey(), $subject->getNamespace(), $subject->getInterwiki(), $query->getQueryId()); $containerSemanticData = new ContainerSemanticData($subject); } return new DIContainer($containerSemanticData); }