Adding comments about obsolete plugins.
[squirrelmail.git] / class / mime / Rfc822Header.class.php
index eb9e3d3fb28f3069f072f6199d5294895078c10e..ba22d2568615bdcaeb5554ad665a498f2bee0fe2 100644 (file)
@@ -3,11 +3,10 @@
 /**
  * Rfc822Header.class.php
  *
- * Copyright (c) 2003-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * This file contains functions needed to handle headers in mime messages.
  *
+ * @copyright © 2003-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @subpackage mime
@@ -89,7 +88,8 @@ class Rfc822Header {
      */
     var $mime = false;
     /**
-     * @var mixed
+     * Content Type object
+     * @var object
      */
     var $content_type = '';
     /**
@@ -157,7 +157,7 @@ class Rfc822Header {
                 }
             }
         }
-        if ($this->content_type == '') {
+        if (!is_object($this->content_type)) {
             $this->parseContentType('text/plain; charset=us-ascii');
         }
     }
@@ -180,7 +180,9 @@ class Rfc822Header {
                         }
                         $result .= $value{$i};
                     }
-                    $result .= $value{$i};
+                    if($i < $cnt) {
+                        $result .= $value{$i};
+                    }
                     break;
                 case '(':
                     $depth = 1;
@@ -939,4 +941,4 @@ class Rfc822Header {
     }
 }
 
-?>
\ No newline at end of file
+?>