From d86dbdf56aca1d014e22b819834799be9a3780a3 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 6 Nov 2010 00:18:30 +0000 Subject: [PATCH] Do not assign the variable in the condition. Use transform() instead of the deprecated getThumbnail() --- includes/specials/SpecialUploadStash.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1