Browse Source

$this->content_type == '' test causes E_NOTICE in php 5.1, when
$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.

tokul 19 years ago
parent
commit
9d85fd232c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      class/mime/Rfc822Header.class.php

+ 3 - 2
class/mime/Rfc822Header.class.php

@@ -88,7 +88,8 @@ class Rfc822Header {
      */
      */
     var $mime = false;
     var $mime = false;
     /**
     /**
-     * @var mixed
+     * Content Type object
+     * @var object
      */
      */
     var $content_type = '';
     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');
             $this->parseContentType('text/plain; charset=us-ascii');
         }
         }
     }
     }