From: Michael M Slusarz Date: Thu, 28 Jan 2010 20:12:53 +0000 (-0700) Subject: Fix phpdoc; make sure charset exists before appending to content-type X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9c16f95b147e98dfa102dd28a971927fa9a94623;p=horde.git Fix phpdoc; make sure charset exists before appending to content-type --- 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.