// If statement for paranoia
if ( $file ) {
$thumb = $file->transform( [ 'width' => 180, 'height' => 360 ] );
-
- return $thumb->toHtml( [ 'desc-link' => true ] );
+ if ( $thumb ) {
+ return $thumb->toHtml( [ 'desc-link' => true ] );
+ } else {
+ return wfMessage( 'thumbnail_error', '' )->escaped();
+ }
} else {
return htmlspecialchars( $value );
}
case 'img_description':
return Linker::formatComment( $value );
case 'count':
- return intval( $value ) + 1;
+ return $this->getLanguage()->formatNum( intval( $value ) + 1 );
case 'top':
// Messages: listfiles-latestversion-yes, listfiles-latestversion-no
return $this->msg( 'listfiles-latestversion-' . $value );