From 90cccba602e751cbe02ade74b8e32ade1bc09f43 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Nov 2017 16:20:41 +0100 Subject: [PATCH] fix header swift from prod --- tools/swift/Swift/Message/Headers.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/swift/Swift/Message/Headers.php b/tools/swift/Swift/Message/Headers.php index 9fb38882..845f9d23 100755 --- a/tools/swift/Swift/Message/Headers.php +++ b/tools/swift/Swift/Message/Headers.php @@ -420,10 +420,10 @@ class Swift_Message_Headers if (false !== $p = strpos($encoded_value[$key], $this->LE)) { - $cb = 'str_replace("' . $this->LE . '", "", "<$1>");'; - //$encoded_value[$key] = preg_replace("/<([^>]+)>/e", $cb, $encoded_value[$key]); + // $cb = 'str_replace("' . $this->LE . '", "", "<$1>");'; + // $encoded_value[$key] = preg_replace("/<([^>]+)>/e", $cb, $encoded_value[$key]); $encoded_value[$key] = preg_replace_callback('/<([^>]+)>/', function($matches) { - return str_replace("' . $this->LE . '", '', $matches[1]); + return str_replace($this->LE, '', '<' . $matches[1] . '>'); }, $encoded_value[$key]); }