From b06ba4991ec72069c4fa1a0bd73e916b0fac42fb Mon Sep 17 00:00:00 2001 From: Reedy Date: Thu, 25 Feb 2016 20:36:32 +0000 Subject: [PATCH] mail: Turn UserMailer::quotedPrintableCallback into an inline closure Change-Id: I1b11a95d47caeaf02291a5ab522b57d7570ca738 --- includes/mail/UserMailer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index 464e7b8eee..1c7fb9857b 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -501,12 +501,12 @@ class UserMailer { } $out = "=?$charset?Q?"; $out .= preg_replace_callback( "/([$replace])/", - [ __CLASS__, 'quotedPrintableCallback' ], $string ); + function ( $matches ) { + return sprintf( "=%02X", ord( $matches[1] ) ); + }, + $string + ); $out .= '?='; return $out; } - - protected static function quotedPrintableCallback( $matches ) { - return sprintf( "=%02X", ord( $matches[1] ) ); - } } -- 2.20.1