From 9c16f95b147e98dfa102dd28a971927fa9a94623 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 28 Jan 2010 13:12:53 -0700 Subject: [PATCH] Fix phpdoc; make sure charset exists before appending to content-type --- framework/Mime/lib/Horde/Mime/Part.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index d79af5cc9..285e88fc1 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -531,8 +531,10 @@ class Horde_Mime_Part $ptype = $this->getPrimaryType(); $type = $ptype . '/' . $this->getSubType(); - if ($charset && ($ptype == 'text')) { - $type .= '; charset=' . $this->getCharset(); + if ($charset && + ($ptype == 'text') && + ($charset = $this->getCharset())) { + $type .= '; charset=' . $charset; } return $type; @@ -594,9 +596,7 @@ class Horde_Mime_Part } /** - * Get the character set to use for of this part. Returns a charset for - * all types (not just 'text/*') since we use this charset to determine - * how to encode text in MIME headers. + * Get the character set to use for this part. * * @return string The character set of this part. Returns null if there * is no character set. -- 2.11.0