summaryrefslogtreecommitdiff
path: root/includes/api/ApiUpload.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-05-22 00:45:21 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-05-22 00:45:21 +0200
commit393e0d71f4c5478bea53ff62ff818aebbabb3e40 (patch)
treea40f0a205ee71a5c61fec5bf23557b7d1813340a /includes/api/ApiUpload.php
parent953618714cb41a89b1f1078325f94579fc154b8a (diff)
Update to MediaWiki 1.20.6
Diffstat (limited to 'includes/api/ApiUpload.php')
-rw-r--r--includes/api/ApiUpload.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 3a9b5c56..e7a7849b 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -187,7 +187,12 @@ class ApiUpload extends ApiBase {
$chunkPath = $request->getFileTempname( 'chunk' );
$chunkSize = $request->getUpload( 'chunk' )->getSize();
if ($this->mParams['offset'] == 0) {
- $result['filekey'] = $this->performStash();
+ try {
+ $result['filekey'] = $this->performStash();
+ } catch ( MWException $e ) {
+ // FIXME: Error handling here is wrong/different from rest of this
+ $this->dieUsage( $e->getMessage(), 'stashfailed' );
+ }
} else {
$status = $this->mUpload->addChunk($chunkPath, $chunkSize,
$this->mParams['offset']);