return false;
}
} elseif ( $wgUploadThumbnailRenderMethod === 'http' ) {
- $status = $this->hitThumbUrl( $file, $transformParams );
+ $thumbUrl = '';
+ $status = $this->hitThumbUrl( $file, $transformParams, $thumbUrl );
wfDebug( __METHOD__ . ": received status {$status}\n" );
} elseif ( $status ) {
// Note that this currently happens (500) when requesting sizes larger then or
// equal to the original, which is harmless.
- $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status );
+ $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl );
return false;
} else {
$this->setLastError( __METHOD__ . ': HTTP request failure' );
}
}
- protected function hitThumbUrl( $file, $transformParams ) {
+ protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) {
global $wgUploadThumbnailRenderHttpCustomHost, $wgUploadThumbnailRenderHttpCustomDomain;
$thumbName = $file->thumbName( $transformParams );