Avoid using ContentHandler::getContentText()

ContentHandler::getContentText() is deprecated and should be
replaced with Content::getText() for TextContent instances.

Change-Id: If38508a069c668e43686226262acbb8ecce92764
This commit is contained in:
Alexander Vorwerk 2021-05-18 00:37:41 +02:00 committed by Zabe
parent 83a24f0f2d
commit d54338f52b

View file

@ -137,7 +137,8 @@ class TitleBlacklist {
} else {
$page = WikiPage::factory( $title );
if ( $page->exists() ) {
return ContentHandler::getContentText( $page->getContent() );
$content = $page->getContent();
return ( $content instanceof TextContent ) ? $content->getText() : "";
}
}
} elseif ( $source['type'] == 'url' && count( $source ) >= 2 ) {