Fix undefined error.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 18 Feb 2010 00:16:19 +0000 (17:16 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 18 Feb 2010 07:46:02 +0000 (00:46 -0700)
imp/lib/Mime/Viewer/Plain.php

index c8d80fd..c0cc69a 100644 (file)
@@ -62,19 +62,19 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
         }
 
         // Trim extra whitespace in the text.
+        $charset = $this->_mimepart->getCharset();
         $text = trim($this->_mimepart->getContents());
         if ($text == '') {
             return array(
                 $mime_id => array(
                     'data' => '',
                     'status' => array(),
-                    'type' => $type
+                    'type' => 'text/html; charset=' . $charset
                 )
             );
         }
 
         // Convert to the local charset.
-        $charset = $this->_mimepart->getCharset();
         if ($inline) {
             $text = Horde_String::convertCharset($text, $charset);
             $charset = Horde_Nls::getCharset();