From 361d4c3b6e08119def4bc7d2efdd3f1c0724b95d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 16 Nov 2009 15:41:04 -0700 Subject: [PATCH] Make sure there is some text displayed for the name entry --- imp/lib/Message.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imp/lib/Message.php b/imp/lib/Message.php index 51601d343..3821c48ed 100644 --- a/imp/lib/Message.php +++ b/imp/lib/Message.php @@ -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); } -- 2.11.0