From 999fd3901cf6190f96c63f83978aeb3e09f45946 Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Mon, 15 Jul 2013 16:50:41 +1200 Subject: [PATCH] FIX preg_replace_callback in emailer was broken Fixes bug introduced by 9deb11f9a0ee01477af38f2826b2a7583545a0b6 Email has no content This is what happens when we make commits without testing! --- email/Mailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/email/Mailer.php b/email/Mailer.php index c45fdffe8..cf2e55cfd 100644 --- a/email/Mailer.php +++ b/email/Mailer.php @@ -424,7 +424,7 @@ function encodeFileForEmail($file, $destFileName = false, $disposition = NULL, $ function QuotedPrintable_encode($quotprint) { $quotprint = (string)str_replace('\r\n',chr(13).chr(10),$quotprint); $quotprint = (string)str_replace('\n', chr(13).chr(10),$quotprint); - $quotprint = (string)preg_replace_callback("~([\x01-\x1F\x3D\x7F-\xFF])~e", function($matches) { + $quotprint = (string)preg_replace_callback("~([\x01-\x1F\x3D\x7F-\xFF])~", function($matches) { return sprintf('=%02X', ord($matches[1])); }, $quotprint); //$quotprint = (string)str_replace('\=0D=0A',"=0D=0A",$quotprint);