jobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`
authorDerick Alangi <alangiderick@gmail.com>
Tue, 27 Aug 2019 22:52:38 +0000 (23:52 +0100)
committerD3r1ck01 <xsavitar.wiki@aol.com>
Fri, 30 Aug 2019 21:55:04 +0000 (21:55 +0000)
Change-Id: I58c007436d38e4d0edd1ce14034b2f3bfb536df9

includes/jobqueue/jobs/ThumbnailRenderJob.php

index 85e3af9..28e6433 100644 (file)
@@ -108,7 +108,8 @@ class ThumbnailRenderJob extends Job {
 
                // T203135 We don't wait for the request to complete, as this is mostly fire & forget.
                // Looking at the HTTP status of requests that take less than 1s is a sanity check.
-               $request = MWHttpRequest::factory( $thumbUrl,
+               $request = MediaWikiServices::getInstance()->getHttpRequestFactory()->create(
+                       $thumbUrl,
                        [ 'method' => 'HEAD', 'followRedirects' => true, 'timeout' => 1 ],
                        __METHOD__
                );