r110979 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110978‎ | r110979 | r110980 >
Date:23:09, 8 February 2012
Author:raindrift
Status:resolved (Comments)
Tags:core 
Comment:
Properly expand the "error storing file" message. Fixes bug 33846
Modified paths:
  • /trunk/phase3/includes/upload/UploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadStash.php
@@ -214,7 +214,8 @@
215215 $error = array( 'unknown', 'no error recorded' );
216216 }
217217 }
218 - throw new UploadStashFileException( "Error storing file in '$path': " . implode( '; ', $error ) );
 218+ // at this point, $error should contain the single "most important" error, plus any parameters.
 219+ throw new UploadStashFileException( "Error storing file in '$path': " . implode( '; ', wfMessage( $error ) ) );
219220 }
220221 $stashPath = $storeStatus->value;
221222

Follow-up revisions

RevisionCommit summaryAuthorDate
r110982r110979: removed implode() call and format the message as plaintext, as any H...aaron23:25, 8 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110687(bug 33846) Fixed backwards error msg/param passing.aaron21:42, 3 February 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   23:10, 8 February 2012

Why is the implode still there?

#Comment by Aaron Schulz (talk | contribs)   23:13, 8 February 2012

By default wfMessage() parses messages (rather than plaintext). This might be a bit ugly when shown via the API.

Status & tagging log