r11974 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11973‎ | r11974 | r11975 >
Date:06:14, 5 December 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 4167) Fix regression caused by patch for bug 153
New code didn't check for null thumbnail (deleted or nonexistent images)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -500,12 +500,11 @@
501501 $boxheight = -1;
502502 if ( '' == $manual_thumb ) {
503503 $thumb = $img->getThumbnail( $boxwidth, $boxheight );
504 - if ( is_null( $thumb ) ) {
505 - return '<b>FATAL ERROR: Thumb object NULL in Linker.php:504</b>';
 504+ if ( $thumb ) {
 505+ $thumbUrl = $thumb->getUrl();
 506+ $boxwidth = $thumb->width;
 507+ $boxheight = $thumb->height;
506508 }
507 - $thumbUrl = $thumb->getUrl();
508 - $boxwidth = $thumb->width;
509 - $boxheight = $thumb->height;
510509 }
511510 }
512511 $oboxwidth = $boxwidth + 2;
Index: trunk/phase3/RELEASE-NOTES
@@ -294,6 +294,7 @@
295295 * (bug 4165) Correct validation for user language selection (data taint)
296296 * Add createpage and createtalk permission keys, allowing a quick
297297 switch to disable page creation for anonymous users.
 298+* (bug 4167) Fix regression caused by patch for bug 153
298299
299300
300301 === Caveats ===

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r11944* (bug 153) Adjust thumbnail size calculations to match consistently;...vibber08:52, 4 December 2005

Status & tagging log