r99002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99001‎ | r99002 | r99003 >
Date:13:47, 5 October 2011
Author:reedy
Status:ok
Tags:
Comment:
3 PHP Fatal error: Call to undefined method LocalFile::getFileKey() in /usr/local/apache/common-local/php-1.18/includes/api/ApiUpload.php on line 150

Tag: REL1_18, 1.18wmf1
Modified paths:
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUpload.php
@@ -175,7 +175,12 @@
176176 */
177177 function performStash() {
178178 try {
179 - $fileKey = $this->mUpload->stashFile()->getFileKey();
 179+ $stashFile = $this->mUpload->stashFile();
 180+
 181+ if ( !$stashFile ) {
 182+ throw new MWException( 'Invalid stashed file' );
 183+ }
 184+ $fileKey = $stashFile->getFileKey();
180185 } catch ( MWException $e ) {
181186 $message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage();
182187 wfDebug( __METHOD__ . ' ' . $message . "\n");

Follow-up revisions

RevisionCommit summaryAuthorDate
r99003MFT r99002reedy13:55, 5 October 2011

Status & tagging log