Bsitu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70114


Change subject: Fix the error in html email when pear mail_mime is missing
......................................................................

Fix the error in html email when pear mail_mime is missing

When pear package mail_mime is missing, attempt to send html email throws error:
mail() expects parameter 3 to be string, array given.  This is because the code
doesn't unset the html part of the body when falling back to text email

Change-Id: Ie8c73a481cb9003a0b43893cf4751475bdf5c690
---
M includes/UserMailer.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/70114/1

diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index 2a549ac..8e3f048 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -258,6 +258,8 @@
                        wfDebug( "Assembling multipart mime email\n" );
                        if ( !stream_resolve_include_path( 'Mail/mime.php' ) ) {
                                wfDebug( "PEAR Mail_Mime package is not 
installed. Falling back to text email.\n" );
+                               // remove the html body for text email fall back
+                               $body = $body['text'];
                        }
                        else {
                                require_once 'Mail/mime.php';

-- 
To view, visit https://gerrit.wikimedia.org/r/70114
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8c73a481cb9003a0b43893cf4751475bdf5c690
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to