From 8792069ff7e8df29debeec04fffb4b680b272278 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 27 Mar 2016 16:16:35 +0200 Subject: [PATCH] Fix Exceptions in Email::addMimePart() --- wcfsetup/install/files/lib/system/email/Email.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/email/Email.class.php b/wcfsetup/install/files/lib/system/email/Email.class.php index 86c26c3de8..0822fca226 100644 --- a/wcfsetup/install/files/lib/system/email/Email.class.php +++ b/wcfsetup/install/files/lib/system/email/Email.class.php @@ -382,11 +382,11 @@ class Email { foreach ($part->getAdditionalHeaders() as $header) { $header[0] = mb_strtolower($header[0]); if ($header[0] == 'content-type' || $header[0] == 'content-transfer-encoding') { - throw new SystemException("The header '".$header."' may not be set. Use the proper methods."); + throw new SystemException("The header '".$header[0]."' may not be set. Use the proper methods."); } if (!StringUtil::startsWith($header[0], 'x-') && !StringUtil::startsWith($header[0], 'content-')) { - throw new SystemException("The header '".$header."' may not be set. You may only set headers starting with 'X-' or 'Content-'."); + throw new SystemException("The header '".$header[0]."' may not be set. You may only set headers starting with 'X-' or 'Content-'."); } } @@ -395,7 +395,7 @@ class Email { case 'quoted-printable': break; default: - throw new SystemException("The Content-Transfer-Encoding '".$header."' may not be set. You may only use 'quoted-printable' or 'base64'."); + throw new SystemException("The Content-Transfer-Encoding '".$part->getContentTransferEncoding()."' may not be set. You may only use 'quoted-printable' or 'base64'."); } if ($part instanceof TextMimePart) { -- 2.20.1