summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-11 21:48:45 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-11 21:48:45 +0100
commitbe1496d1a8618ef186047468009c7e3e0640183b (patch)
tree92bce7844ffa06bcae2626dcbacda11846f2d5b4 /system/libraries/Email.php
parentf6ead61e8930574b0e7e8cfad6b4878bb169d61a (diff)
Utf8/iconv/mbstring-related changes
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 7d13a4645..93c19de5e 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1544,7 +1544,7 @@ class CI_Email {
{
return mb_encode_mimeheader($str, $this->charset, 'Q', $this->crlf);
}
- elseif (extension_loaded('iconv'))
+ elseif (ICONV_ENABLED === TRUE)
{
$output = @iconv_mime_encode('', $str,
array(
@@ -1573,9 +1573,9 @@ class CI_Email {
isset($chars) OR $chars = strlen($str);
$output = '=?'.$this->charset.'?Q?';
- for ($i = 0, $length = strlen($output), $iconv = extension_loaded('iconv'); $i < $chars; $i++)
+ for ($i = 0, $length = strlen($output); $i < $chars; $i++)
{
- $chr = ($this->charset === 'UTF-8' && $iconv === TRUE)
+ $chr = ($this->charset === 'UTF-8' && ICONV_ENABLED === TRUE)
? '='.implode('=', str_split(strtoupper(bin2hex(iconv_substr($str, $i, 1, $this->charset))), 2))
: '='.strtoupper(bin2hex($str[$i]));