Special:Allmessages by a factor of 16
* Committed a bunch of live hacks from Wikimedia servers
* (bug 6889) PHP notices in thumb.php with missing params
+* Cleaner error behavior on thumb.php with invalid page selection
== Languages updated ==
wfProfileIn( 'thumb.php-render' );
$img = Image::newFromName( $fileName );
-if ( $img ) {
- if ( ! is_null( $page ) ) {
- $img->selectPage( $page );
+try {
+ if ( $img ) {
+ if ( ! is_null( $page ) ) {
+ $img->selectPage( $page );
+ }
+ $thumb = $img->renderThumb( $width, false );
+ } else {
+ $thumb = false;
}
- $thumb = $img->renderThumb( $width, false );
-} else {
+} catch( Exception $ex ) {
+ // Tried to select a page on a non-paged file?
$thumb = false;
}