(bug 34421) avoid duplicate Subject headers in mail
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 18 Feb 2012 10:57:34 +0000 (10:57 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 18 Feb 2012 10:57:34 +0000 (10:57 +0000)
r93397 duplicated the Subject header since it was passed both as an
argument of mail() and in the additional headers array.

This is r111765 done right.

Tested using both Pear and mail() methods.

includes/UserMailer.php

index d72f1fd..88a7d61 100644 (file)
@@ -244,6 +244,8 @@ class UserMailer {
                                $endl = "\n";
                        }
 
+                       # Subject header is unneeded since it an argument of mail()
+                       unset( $headers['Subject'] );
                        $headers = self::arrayToHeaderString( $headers, $endl );
 
                        wfDebug( "Sending mail via internal mail() function\n" );