From c7870d2eae7d33e29ef38e53261dc612f22e7b28 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 10 Aug 2012 21:14:01 +0200 Subject: [PATCH] Pass the parameters to the error message in UploadStash::stashFile(). Currently it shows the error message without any parameters since $error is an array with the message name and its parameters, and the Message class thinks that this is a message with its fallbacks (see wfMessageFallback()) Change-Id: I5d825144795ad108f0a71f90cc530629c5c98a41 --- includes/upload/UploadStash.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index bbee0f5ba0..aa65ffe72d 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -239,7 +239,8 @@ class UploadStash { } } // at this point, $error should contain the single "most important" error, plus any parameters. - throw new UploadStashFileException( "Error storing file in '$path': " . wfMessage( $error )->text() ); + $errorMsg = array_shift( $error ); + throw new UploadStashFileException( "Error storing file in '$path': " . wfMessage( $errorMsg, $error )->text() ); } $stashPath = $storeStatus->value; -- 2.20.1