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
(cherry picked from commit 5bde75bf38)
This commit is contained in:
C. Scott Ananian 2024-04-10 11:32:44 -04:00 committed by Jforrester
parent ffdbcf5723
commit 6ddb12cb28

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;
}