From a786e951a754be8d4a3e0dd8a1e85658843b54fd Mon Sep 17 00:00:00 2001 From: Marlin Cremers Date: Wed, 14 Oct 2015 14:08:20 +0200 Subject: [PATCH] Include _appCharset in serialisation process --- src/Mailer/Email.php | 2 +- tests/TestCase/Mailer/EmailTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mailer/Email.php b/src/Mailer/Email.php index 087f38e44b0..37993852a0e 100644 --- a/src/Mailer/Email.php +++ b/src/Mailer/Email.php @@ -1906,7 +1906,7 @@ public function jsonSerialize() $properties = [ '_to', '_from', '_sender', '_replyTo', '_cc', '_bcc', '_subject', '_returnPath', '_readReceipt', '_emailFormat', '_emailPattern', '_domain', - '_attachments', '_messageId', '_headers', 'viewVars', 'charset', 'headerCharset' + '_attachments', '_messageId', '_headers', '_appCharset', 'viewVars', 'charset', 'headerCharset' ]; $array = ['viewConfig' => $this->viewBuilder()->jsonSerialize()]; diff --git a/tests/TestCase/Mailer/EmailTest.php b/tests/TestCase/Mailer/EmailTest.php index 288fa6fe362..ff20f3f719a 100644 --- a/tests/TestCase/Mailer/EmailTest.php +++ b/tests/TestCase/Mailer/EmailTest.php @@ -2701,6 +2701,7 @@ public function testJsonSerialize() '_emailFormat' => 'text', '_messageId' => '', '_domain' => 'foo.bar', + '_appCharset' => 'UTF-8', 'charset' => 'utf-8', 'headerCharset' => 'utf-8', 'viewConfig' => [