TitleLibrary: Don't register external titles as dependencies

In TitleLibrary::getContentInternal(), an external (interwiki) title will
fail when we try to `Parser::fetchCurrentRevisionRecordOfTitle`, but by
that time we've already tried to add it to the dependency list for the
page via `ParserOutput::addTemplate()`, which causes issues further on.

Bug: T362222
Change-Id: I171e97f17b6de176f92ced47757d10c341c979fd
This commit is contained in:
C. Scott Ananian 2024-04-10 11:32:44 -04:00 committed by Hashar
parent ffdbcf5723
commit fb5e59536f

View file

@ -290,7 +290,7 @@ class TitleLibrary extends LibraryBase {
*/
private function getContentInternal( $text ) {
$title = Title::newFromText( $text );
if ( !$title ) {
if ( !$title || $title->isExternal() ) {
return null;
}