From: Michael M Slusarz Date: Thu, 2 Jul 2009 19:28:01 +0000 (-0600) Subject: Properly clone Horde_Mime_Part objects. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9a984163d1813dcb27454914939e713b1e7dee9e;p=horde.git Properly clone Horde_Mime_Part objects. --- 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