* @ingroup JobQueue
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Job for asynchronous rendering of thumbnails.
*
$transformParams = $this->params['transformParams'];
- $file = wfLocalFile( $this->title );
+ $file = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
+ ->newFile( $this->title );
$file->load( File::READ_LATEST );
if ( $file && $file->exists() ) {
if ( $wgUploadThumbnailRenderHttpCustomDomain ) {
$parsedUrl = wfParseUrl( $thumbUrl );
- if ( !$parsedUrl || !isset( $parsedUrl['path'] ) || !strlen( $parsedUrl['path'] ) ) {
+ if ( !isset( $parsedUrl['path'] ) || $parsedUrl['path'] === '' ) {
$this->setLastError( __METHOD__ . ": invalid thumb URL: $thumbUrl" );
return false;
}