From: Michael M Slusarz Date: Wed, 10 Dec 2008 23:08:16 +0000 (-0700) Subject: 'message/rfc822' parts may not have subparts. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f4b95456236063d58f8553caf36f4871ce545785;p=horde.git 'message/rfc822' parts may not have subparts. The entire text of the message may live solely in the present part. --- 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) {