From: jenkins-bot Date: Thu, 25 Feb 2016 17:12:13 +0000 (+0000) Subject: Merge "Fixup contenttype stuff in UserMailer" X-Git-Tag: 1.31.0-rc.0~7832 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git Merge "Fixup contenttype stuff in UserMailer" --- f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b diff --cc includes/mail/UserMailer.php index 5343b2c703,ded5dec100..464e7b8eee --- a/includes/mail/UserMailer.php +++ b/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' ); @@@ -125,9 -125,12 +125,12 @@@ $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