diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php index 0752dbd81f9..f640cdfb12a 100644 --- a/lib/phpmailer/class.phpmailer.php +++ b/lib/phpmailer/class.phpmailer.php @@ -1155,7 +1155,7 @@ class PHPMailer /// Start Moodle Hack - if we are running under unicodedb, we'll try our own /// encode_header code that's multibyte-safe global $CFG; - if ($CFG->unicodedb) { + if (!empty($CFG->unicodedb)) { $textlib = textlib_get_instance(); return $textlib->encode_mimeheader($str, $this->CharSet); }