From dacf28e3c6c1a4ae452e5f49807b9632576314bb Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Sun, 27 Jul 2003 01:50:11 +0000 Subject: [PATCH] Check for empty default_charset in imap_utf7_decode_local() too. Duplicate code is bad :(. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5432 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_utf7_local.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/imap_utf7_local.php b/functions/imap_utf7_local.php index 5478ea6b..c2a9ce8b 100644 --- a/functions/imap_utf7_local.php +++ b/functions/imap_utf7_local.php @@ -91,8 +91,8 @@ function imap_utf7_decode_local($s) { return ''; global $default_charset; - set_my_charset(); - if (strtolower($default_charset) != 'iso-8859-1') { + set_my_charset(); //must be called before using $default_charset + if ((strtolower($default_charset) != 'iso-8859-1') && ($default_charset != '')) { $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset); if ($utf7_s != '') return $utf7_s; -- 2.25.1