Ticket #9201: part might not exist
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Aug 2010 17:34:56 +0000 (11:34 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Aug 2010 17:41:05 +0000 (11:41 -0600)
imp/lib/Contents.php

index 19a0194..b6efdb1 100644 (file)
@@ -330,7 +330,8 @@ class IMP_Contents
          * characters (e.g. euro sign, back quote) not in 8859-1. There
          * shouldn't be any issue doing this since the additional code points
          * in 1252 don't map to anything in 8859-1. */
-        if (strcasecmp($part->getCharset(), 'ISO-8859-1') === 0) {
+        if ($part &&
+            (strcasecmp($part->getCharset(), 'ISO-8859-1') === 0)) {
             $part->setCharset('windows-1252');
         }