From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- includes/job/jobs/AssembleUploadChunksJob.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'includes/job/jobs/AssembleUploadChunksJob.php') diff --git a/includes/job/jobs/AssembleUploadChunksJob.php b/includes/job/jobs/AssembleUploadChunksJob.php index c5dd9eaa..6237e568 100644 --- a/includes/job/jobs/AssembleUploadChunksJob.php +++ b/includes/job/jobs/AssembleUploadChunksJob.php @@ -42,6 +42,15 @@ class AssembleUploadChunksJob extends Job { return false; } + if ( count( $_SESSION ) === 0 ) { + // Empty session probably indicates that we didn't associate + // with the session correctly. Note that being able to load + // the user does not necessarily mean the session was loaded. + // Most likely cause by suhosin.session.encrypt = On. + $this->setLastError( "Error associating with user session. Try setting suhosin.session.encrypt = Off" ); + return false; + } + UploadBase::setSessionStatus( $this->params['filekey'], array( 'result' => 'Poll', 'stage' => 'assembling', 'status' => Status::newGood() ) @@ -82,11 +91,11 @@ class AssembleUploadChunksJob extends Job { UploadBase::setSessionStatus( $this->params['filekey'], array( - 'result' => 'Success', - 'stage' => 'assembling', - 'filekey' => $newFileKey, + 'result' => 'Success', + 'stage' => 'assembling', + 'filekey' => $newFileKey, 'imageinfo' => $imageInfo, - 'status' => Status::newGood() + 'status' => Status::newGood() ) ); } catch ( MWException $e ) { @@ -94,7 +103,7 @@ class AssembleUploadChunksJob extends Job { $this->params['filekey'], array( 'result' => 'Failure', - 'stage' => 'assembling', + 'stage' => 'assembling', 'status' => Status::newFatal( 'api-error-stashfailed' ) ) ); -- cgit v1.2.2