Index: branches/wmf/1.16wmf4/includes/media/Bitmap.php |
— | — | @@ -158,8 +158,10 @@ |
159 | 159 | // or ImageMagick may decide your ratio is wrong and slice off |
160 | 160 | // a pixel. |
161 | 161 | " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) . |
162 | | - // Add the source url as a comment to the thumb. |
163 | | - " -set comment " . wfEscapeShellArg( $this->escapeMagickProperty( $comment ) ) . |
| 162 | + // Add the source url as a comment to the thumb, but don't add the flag if there's no comment |
| 163 | + $params['comment'] !== '' |
| 164 | + ? " -set comment " . wfEscapeShellArg( $this->escapeMagickProperty( $params['comment'] ) ) |
| 165 | + : '' . |
164 | 166 | " -depth 8 $sharpen " . |
165 | 167 | wfEscapeShellArg( $this->escapeMagickOutput( $dstPath ) ) . " 2>&1"; |
166 | 168 | wfDebug( __METHOD__.": running ImageMagick: $cmd\n" ); |