From: Chad Horohoe Date: Wed, 11 Nov 2015 01:28:32 +0000 (-0800) Subject: UserMailer: Use PHP_EOL instead of DIY X-Git-Tag: 1.31.0-rc.0~9020^2 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=885b5b842fd65c96f32041e7b89bda2d295d2a33 UserMailer: Use PHP_EOL instead of DIY Also fixes arrayToHeaderString() to be correct when called without the $endl parameter Change-Id: I8b9f72500f9a055f9f2e1cfcbb276d565674f1b8 --- diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index 49ce21c7d2..85595f1286 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -64,7 +64,7 @@ class UserMailer { * * @return string */ - static function arrayToHeaderString( $headers, $endl = "\n" ) { + static function arrayToHeaderString( $headers, $endl = PHP_EOL ) { $strings = array(); foreach ( $headers as $name => $value ) { // Prevent header injection by stripping newlines from value @@ -292,11 +292,7 @@ class UserMailer { // Line endings need to be different on Unix and Windows due to // the bug described at http://trac.wordpress.org/ticket/2603 - if ( wfIsWindows() ) { - $endl = "\r\n"; - } else { - $endl = "\n"; - } + $endl = PHP_EOL; if ( is_array( $body ) ) { // we are sending a multipart message