dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
605279b
)
3 PHP Fatal error: Call to undefined method LocalFile::getFileKey() in /usr/local...
author
Sam Reed
<reedy@users.mediawiki.org>
Wed, 5 Oct 2011 13:47:02 +0000
(13:47 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Wed, 5 Oct 2011 13:47:02 +0000
(13:47 +0000)
Tag: REL1_18, 1.18wmf1
includes/api/ApiUpload.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiUpload.php
b/includes/api/ApiUpload.php
index
d69bc85
..
961081d
100644
(file)
--- a/
includes/api/ApiUpload.php
+++ b/
includes/api/ApiUpload.php
@@
-175,7
+175,12
@@
class ApiUpload extends ApiBase {
*/
function performStash() {
try {
- $fileKey = $this->mUpload->stashFile()->getFileKey();
+ $stashFile = $this->mUpload->stashFile();
+
+ if ( !$stashFile ) {
+ throw new MWException( 'Invalid stashed file' );
+ }
+ $fileKey = $stashFile->getFileKey();
} catch ( MWException $e ) {
$message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage();
wfDebug( __METHOD__ . ' ' . $message . "\n");