diff options
author | Andrey Andreev <narf@devilix.net> | 2015-11-04 14:43:11 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-11-04 14:43:11 +0100 |
commit | 66a8940823b8ce9cd9e0bfe5d4263008a437a422 (patch) | |
tree | 0d02a82cce7adfbfeee51e2a4a7257c74f906551 /system/libraries/Email.php | |
parent | 175b17c4b74d03a7578440d92a3ac9d80924ef78 (diff) | |
parent | ab3c383fb3535e55253271f210870cd9361d94c9 (diff) |
Merge branch '3.0-stable' into develop
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index acf3629c3..ebff7567a 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1563,11 +1563,10 @@ class CI_Email { if ($this->charset === 'UTF-8') { - if (MB_ENABLED === TRUE) - { - return mb_encode_mimeheader($str, $this->charset, 'Q', $this->crlf); - } - elseif (ICONV_ENABLED === TRUE) + // Note: We used to have mb_encode_mimeheader() as the first choice + // here, but it turned out to be buggy and unreliable. DO NOT + // re-add it! -- Narf + if (ICONV_ENABLED === TRUE) { $output = @iconv_mime_encode('', $str, array( @@ -1590,6 +1589,10 @@ class CI_Email { $chars = iconv_strlen($str, 'UTF-8'); } + elseif (MB_ENABLED === TRUE) + { + $chars = mb_strlen($str, 'UTF-8'); + } } // We might already have this set for UTF-8 |