From: Raimond Spekking Date: Thu, 17 Dec 2009 22:54:55 +0000 (+0000) Subject: Follow-up r60175: Avoid PHP Notice: Undefined index: descriptionUrl in /var/www/w... X-Git-Tag: 1.31.0-rc.0~38509 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=3a188007c7c64e03a0c3994ce55046e061f95c6a;p=lhc%2Fweb%2Fwiklou.git Follow-up r60175: Avoid PHP Notice: Undefined index: descriptionUrl in /var/www/w/includes/media/Bitmap.php on line 63 --- diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index ddbf33ed88..016933b119 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -60,7 +60,7 @@ class BitmapHandler extends ImageHandler { $physicalHeight = $params['physicalHeight']; $clientWidth = $params['width']; $clientHeight = $params['height']; - $descriptionUrl = $params['descriptionUrl']; + $descriptionUrl = isset( $params['descriptionUrl'] ) ? "File source: ". $params['descriptionUrl'] : ''; $srcWidth = $image->getWidth(); $srcHeight = $image->getHeight(); $mimeType = $image->getMimeType(); @@ -155,7 +155,7 @@ class BitmapHandler extends ImageHandler { // or ImageMagick may decide your ratio is wrong and slice off // a pixel. " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) . - " -set comment " . wfEscapeShellArg( "File source: {$descriptionUrl}" ) . + " -set comment " . wfEscapeShellArg( "{$descriptionUrl}" ) . " -depth 8 $sharpen " . wfEscapeShellArg($dstPath) . " 2>&1"; wfDebug( __METHOD__.": running ImageMagick: $cmd\n");