$this->content_type == '' test causes E_NOTICE in php 5.1, when
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 27 Nov 2005 08:16:02 +0000 (08:16 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 27 Nov 2005 08:16:02 +0000 (08:16 +0000)
$this->content_type is object. content_type should always store ContentType
object and this code is only to make sure that parameter is not default
string.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10411 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/Rfc822Header.class.php

index d2b2ff1..78e8911 100644 (file)
@@ -88,7 +88,8 @@ class Rfc822Header {
      */
     var $mime = false;
     /**
-     * @var mixed
+     * Content Type object
+     * @var object
      */
     var $content_type = '';
     /**
@@ -156,7 +157,7 @@ class Rfc822Header {
                 }
             }
         }
-        if ($this->content_type == '') {
+        if (!is_object($this->content_type)) {
             $this->parseContentType('text/plain; charset=us-ascii');
         }
     }