r99003 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99002‎ | r99003 | r99004 >
Date:13:55, 5 October 2011
Author:reedy
Status:ok
Tags:
Comment:
MFT r99002
Modified paths:
  • /branches/wmf/1.18wmf1/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/api/ApiUpload.php
@@ -147,7 +147,12 @@
148148 */
149149 function performStash() {
150150 try {
151 - $fileKey = $this->mUpload->stashFile()->getFileKey();
 151+ $stashFile = $this->mUpload->stashFile();
 152+
 153+ if ( !$stashFile ) {
 154+ throw new MWException( 'Invalid stashed file' );
 155+ }
 156+ $fileKey = $stashFile->getFileKey();
152157 } catch ( MWException $e ) {
153158 $message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage();
154159 wfDebug( __METHOD__ . ' ' . $message . "\n");
Property changes on: branches/wmf/1.18wmf1/includes/api/ApiUpload.php
___________________________________________________________________
Modified: svn:mergeinfo
155160 Merged /trunk/phase3/includes/api/ApiUpload.php:r99002

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r990023 PHP Fatal error: Call to undefined method LocalFile::getFileKey() in /usr/...reedy13:47, 5 October 2011

Status & tagging log