If the thumbnail is an error (or worse yet, if the MediaHandler
returns false, like TMH does in certain circumstances), we
should not add responsive thumbnail links.
Change-Id: I2aafbd07e8435ce2d1b4cb32e49e98cb5f6c00ab
*/
public static function processResponsiveImages( $file, $thumb, $hp ) {
global $wgResponsiveImages;
- if ( $wgResponsiveImages ) {
+ if ( $wgResponsiveImages && $thumb && !$thumb->isError() ) {
$hp15 = $hp;
$hp15['width'] = round( $hp['width'] * 1.5 );
$hp20 = $hp;