From f4b95456236063d58f8553caf36f4871ce545785 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 10 Dec 2008 16:08:16 -0700 Subject: [PATCH] 'message/rfc822' parts may not have subparts. The entire text of the message may live solely in the present part. --- framework/Mime/lib/Horde/Mime/Part.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index bc3a54eef..a9f5f9999 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1230,8 +1230,10 @@ class Horde_Mime_Part $id .= '.'; if ($this->getType() == 'message/rfc822') { - reset($this->_parts); - $this->_parts[key($this->_parts)]->buildMimeIds($id, true); + if (count($this->_parts)) { + reset($this->_parts); + $this->_parts[key($this->_parts)]->buildMimeIds($id, true); + } } elseif (!empty($this->_parts)) { $i = 1; foreach (array_keys($this->_parts) as $val) { -- 2.11.0