Merge "Fixup contenttype stuff in UserMailer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 25 Feb 2016 17:12:13 +0000 (17:12 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 25 Feb 2016 17:12:13 +0000 (17:12 +0000)
1  2 
includes/mail/UserMailer.php

@@@ -114,9 -114,9 +114,9 @@@ class UserMailer 
         * @throws Exception
         * @return Status
         */
 -      public static function send( $to, $from, $subject, $body, $options = array() ) {
 +      public static function send( $to, $from, $subject, $body, $options = [] ) {
                global $wgAllowHTMLEmail;
-               $contentType = 'text/plain; charset=UTF-8';
                if ( !is_array( $options ) ) {
                        // Old calling style
                        wfDeprecated( __METHOD__ . ' with $replyto as 5th parameter', '1.26' );
                                $options['contentType'] = func_get_arg( 5 );
                        }
                }
+               if ( !isset( $options['contentType'] ) ) {
+                       $options['contentType'] = 'text/plain; charset=UTF-8';
+               }
  
                if ( !is_array( $to ) ) {
 -                      $to = array( $to );
 +                      $to = [ $to ];
                }
  
                // mail body must have some content