mail: Turn UserMailer::quotedPrintableCallback into an inline closure
authorReedy <reedy@wikimedia.org>
Thu, 25 Feb 2016 20:36:32 +0000 (20:36 +0000)
committerKrinkle <krinklemail@gmail.com>
Mon, 29 Feb 2016 23:19:35 +0000 (23:19 +0000)
Change-Id: I1b11a95d47caeaf02291a5ab522b57d7570ca738

includes/mail/UserMailer.php

index 464e7b8..1c7fb98 100644 (file)
@@ -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] ) );
-       }
 }