From beca818e046f6e9b870c23ed9d203ca563568e18 Mon Sep 17 00:00:00 2001 From: tassium Date: Fri, 17 Oct 2003 21:14:04 +0000 Subject: [PATCH] Don't assume the charset is specified - fallback to us-ascii if it isn't. Doesn't anyone test variables before using them anymore? git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5945 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compose.php b/src/compose.php index bb877878..752aa3cf 100644 --- a/src/compose.php +++ b/src/compose.php @@ -620,7 +620,12 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se } } - $actual = $body_part_entity->header->parameters['charset']; + if (isset($body_part_entity->header->parameters['charset'])) { + $actual = $body_part_entity->header->parameters['charset']; + } else { + $actual = 'us-ascii'; + } + if ( $actual && is_conversion_safe($actual) && $actual != $default_charset){ $bodypart = charset_decode($actual,$bodypart); } -- 2.25.1