global $wgEnotifMaxRecips, $wgAdditionalMailParams;
if ( is_array( $to ) ) {
+ $emails = '';
// This wouldn't be necessary if implode() worked on arrays of
// objects using __toString(). http://bugs.php.net/bug.php?id=36612
foreach ( $to as $t ) {
}
if ( is_array( $wgSMTP ) ) {
- $found = false;
if ( function_exists( 'stream_resolve_include_path' ) ) {
$found = stream_resolve_include_path( 'Mail.php' );
} else {
return $string;
}
$out = "=?$charset?Q?";
- $out .= preg_replace( "/([$replace])/e", 'sprintf("=%02X",ord("$1"))', $string );
+ $out .= preg_replace_callback( "/([$replace])/",
+ array( __CLASS__, 'quotedPrintableCallback' ), $string );
$out .= '?=';
return $out;
}
+
+ protected static function quotedPrintableCallback( $matches ) {
+ return sprintf( "=%02X", ord( $matches[1] ) );
+ }
}
/**