Properly expand the "error storing file" message. Fixes bug 33846
authorIan Baker <raindrift@users.mediawiki.org>
Wed, 8 Feb 2012 23:09:19 +0000 (23:09 +0000)
committerIan Baker <raindrift@users.mediawiki.org>
Wed, 8 Feb 2012 23:09:19 +0000 (23:09 +0000)
includes/upload/UploadStash.php

index 8c12150..14560dd 100644 (file)
@@ -214,7 +214,8 @@ class UploadStash {
                                        $error = array( 'unknown', 'no error recorded' );
                                }
                        }
-                       throw new UploadStashFileException( "Error storing file in '$path': " . implode( '; ', $error ) );
+                       // at this point, $error should contain the single "most important" error, plus any parameters.
+                       throw new UploadStashFileException( "Error storing file in '$path': " . implode( '; ', wfMessage( $error ) ) );
                }
                $stashPath = $storeStatus->value;