Merge "Pass function name to HttpRequestFactory::get"

This commit is contained in:
jenkins-bot 2020-06-07 19:30:56 +00:00 committed by Gerrit Code Review
commit 9197309fea

View file

@ -305,9 +305,14 @@ class TitleBlacklist {
if ( !is_string( $result )
|| ( !$warn && !mt_rand( 0, $wgTitleBlacklistCaching['warningchance'] ) )
) {
$result = Http::get( $url );
$result = MediaWikiServices::getInstance()->getHttpRequestFactory()
->get( $url, [], __METHOD__ );
$cache->set( $warnkey, 1, $wgTitleBlacklistCaching['warningexpiry'] );
$cache->set( $key, $result, $wgTitleBlacklistCaching['expiry'] );
if ( !$result ) {
wfDebugLog( 'TitleBlacklist-cache', "Error loading title blacklist from $url\n" );
$result = '';
}
}
return $result;