From 6a47dbfc688cec03b7933ab9633e0498be5890a7 Mon Sep 17 00:00:00 2001 From: MGatner Date: Thu, 30 Jan 2020 15:32:16 -0500 Subject: [PATCH] Replace legacy CI3 constant. Fixes #2512 --- system/Email/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Email/Email.php b/system/Email/Email.php index 0b36b8005988..c5abc21e0af8 100644 --- a/system/Email/Email.php +++ b/system/Email/Email.php @@ -1489,7 +1489,7 @@ protected function prepQEncoding($str) $output = '=?' . $this->charset . '?Q?'; for ($i = 0, $length = static::strlen($output); $i < $chars; $i ++) { - $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])); + $chr = ($this->charset === 'UTF-8' && extension_loaded('iconv')) ? '=' . implode('=', str_split(strtoupper(bin2hex(iconv_substr($str, $i, 1, $this->charset))), 2)) : '=' . strtoupper(bin2hex($str[$i])); // RFC 2045 sets a limit of 76 characters per line. // We'll append ?= to the end of each line though. if ($length + ($l = static::strlen($chr)) > 74)