X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2Fjobs%2FPublishStashedFileJob.php;h=59166e8035f75c50977af6c742c13d97e3456427;hb=cc167acbc65567a1030d946b4644363b0fccf090;hp=a922dd3d1192e2aed3b9bce284d5c340f62939bb;hpb=8e3721a2b95c83fd7dd2c4026bc12e6ecc0c711f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/jobs/PublishStashedFileJob.php b/includes/jobqueue/jobs/PublishStashedFileJob.php index a922dd3d11..59166e8035 100644 --- a/includes/jobqueue/jobs/PublishStashedFileJob.php +++ b/includes/jobqueue/jobs/PublishStashedFileJob.php @@ -29,12 +29,13 @@ * @ingroup JobQueue */ class PublishStashedFileJob extends Job { - public function __construct( $title, $params ) { + public function __construct( Title $title, array $params ) { parent::__construct( 'PublishStashedFile', $title, $params ); $this->removeDuplicates = true; } public function run() { + /** @noinspection PhpUnusedLocalVariableInspection */ $scope = RequestContext::importScopedSession( $this->params['session'] ); $context = RequestContext::getMain(); $user = $context->getUser(); @@ -120,7 +121,7 @@ class PublishStashedFileJob extends Job { 'status' => Status::newFatal( 'api-error-publishfailed' ) ) ); - $this->setLastError( get_class( $e ) . ": " . $e->getText() ); + $this->setLastError( get_class( $e ) . ": " . $e->getMessage() ); // To prevent potential database referential integrity issues. // See bug 32551. MWExceptionHandler::rollbackMasterChangesAndLog( $e );