r60188 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60187‎ | r60188 | r60189 >
Date:22:54, 17 December 2009
Author:raymond
Status:ok
Tags:
Comment:
Follow-up r60175: Avoid PHP Notice: Undefined index: descriptionUrl in /var/www/w/includes/media/Bitmap.php on line 63
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/Bitmap.php
@@ -60,7 +60,7 @@
6161 $physicalHeight = $params['physicalHeight'];
6262 $clientWidth = $params['width'];
6363 $clientHeight = $params['height'];
64 - $descriptionUrl = $params['descriptionUrl'];
 64+ $descriptionUrl = isset( $params['descriptionUrl'] ) ? "File source: ". $params['descriptionUrl'] : '';
6565 $srcWidth = $image->getWidth();
6666 $srcHeight = $image->getHeight();
6767 $mimeType = $image->getMimeType();
@@ -155,7 +155,7 @@
156156 // or ImageMagick may decide your ratio is wrong and slice off
157157 // a pixel.
158158 " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) .
159 - " -set comment " . wfEscapeShellArg( "File source: {$descriptionUrl}" ) .
 159+ " -set comment " . wfEscapeShellArg( "{$descriptionUrl}" ) .
160160 " -depth 8 $sharpen " .
161161 wfEscapeShellArg($dstPath) . " 2>&1";
162162 wfDebug( __METHOD__.": running ImageMagick: $cmd\n");

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60175* (bug 19791) Add URL of file source as comment to thumbs (for ImageMagick)raymond20:25, 17 December 2009

Status & tagging log