Make sure there is some text displayed for the name entry
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 16 Nov 2009 22:41:04 +0000 (15:41 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 17 Nov 2009 19:17:01 +0000 (12:17 -0700)
imp/lib/Message.php

index 51601d3..3821c48 100644 (file)
@@ -528,8 +528,9 @@ class IMP_Message
             $newPart->setDisposition('attachment');
 
             /* We need to make sure all text is in the correct charset. */
+            $part_name = $oldPart->getName(true);
             $newPart->setCharset(Horde_Nls::getCharset());
-            $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $oldPart->getName(true)));
+            $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $part_name ? $part_name : _("unnamed")));
             $message->alterPart($partid, $newPart);
         }