Index: branches/wmf/1.18wmf1/includes/api/ApiUpload.php |
— | — | @@ -147,7 +147,12 @@ |
148 | 148 | */ |
149 | 149 | function performStash() { |
150 | 150 | 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(); |
152 | 157 | } catch ( MWException $e ) { |
153 | 158 | $message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage(); |
154 | 159 | wfDebug( __METHOD__ . ' ' . $message . "\n"); |
Property changes on: branches/wmf/1.18wmf1/includes/api/ApiUpload.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
155 | 160 | Merged /trunk/phase3/includes/api/ApiUpload.php:r99002 |