Also fixes arrayToHeaderString() to be correct when called without
the $endl parameter
Change-Id: I8b9f72500f9a055f9f2e1cfcbb276d565674f1b8
*
* @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
// 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