}
// Additional densities for responsive images, if specified.
- if ( !empty( $this->responsiveUrls ) ) {
- $attribs['srcset'] = Html::srcSet( $this->responsiveUrls );
+ // If any of these urls is the same as src url, it'll be excluded.
+ $responsiveUrls = array_diff( $this->responsiveUrls, [ $this->url ] );
+ if ( !empty( $responsiveUrls ) ) {
+ $attribs['srcset'] = Html::srcSet( $responsiveUrls );
}
Hooks::run( 'ThumbnailBeforeProduceHTML', [ $this, &$attribs, &$linkAttribs ] );
function isError() {
return true;
}
+
+ function getHttpStatusCode() {
+ return 500;
+ }
}
/**
max( isset( $params['height'] ) ? $params['height'] : 0, 120 ),
wfMessage( 'thumbnail_invalid_params' )->text() );
}
+
+ function getHttpStatusCode() {
+ return 400;
+ }
}
/**
)->text()
);
}
+
+ function getHttpStatusCode() {
+ return 400;
+ }
}