From 9a984163d1813dcb27454914939e713b1e7dee9e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 2 Jul 2009 13:28:01 -0600 Subject: [PATCH] Properly clone Horde_Mime_Part objects. --- framework/Mime/lib/Horde/Mime/Part.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index f445e7fc2..8d7b6063c 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -216,6 +216,17 @@ class Horde_Mime_Part } /** + * Function to run on clone. + */ + public function __clone() + { + reset($this->_parts); + while (list($k, $v) = each($this->_parts)) { + $this->_parts[$k] = clone $v; + } + } + + /** * Set the content-disposition of this part. * * @param string $disposition The content-disposition to set (inline or -- 2.11.0