From: Alexandre Emsenhuber Date: Fri, 10 Aug 2012 19:14:01 +0000 (+0200) Subject: Pass the parameters to the error message in UploadStash::stashFile(). X-Git-Tag: 1.31.0-rc.0~22775 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=c7870d2eae7d33e29ef38e53261dc612f22e7b28;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;