From: Platonides Date: Sat, 6 Nov 2010 00:18:30 +0000 (+0000) Subject: Do not assign the variable in the condition. X-Git-Tag: 1.31.0-rc.0~34050 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=d86dbdf56aca1d014e22b819834799be9a3780a3;p=lhc%2Fweb%2Fwiklou.git Do not assign the variable in the condition. Use transform() instead of the deprecated getThumbnail() --- diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index e28203a89b..64e59b6a08 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -113,8 +113,8 @@ class SpecialUploadStash extends SpecialPage { // ok we're here so the original must exist. Generate the thumbnail. // because the file is a UploadStashFile, this thumbnail will also be stashed, // and a thumbnailFile will be created in the thumbnailImage composite object - $thumbnailImage = null; - if ( !( $thumbnailImage = $origFile->getThumbnail( $width ) ) ) { + $thumbnailImage = $origFile->transform( array( 'width' => $width ) ); + if ( !$thumbnailImage ) { throw new MWException( 'Could not obtain thumbnail' ); } $file = $thumbnailImage->thumbnailFile;