From: Tim Düsterhus Date: Sun, 27 Mar 2016 14:16:35 +0000 (+0200) Subject: Fix Exceptions in Email::addMimePart() X-Git-Tag: 3.0.0_Beta_1~1286^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8792069ff7e8df29debeec04fffb4b680b272278;p=GitHub%2FWoltLab%2FWCF.git Fix Exceptions in Email::addMimePart() --- 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) {