Skip to content

Commit

Permalink
Fix Horde_Mime_Part clone function
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 17, 2014
1 parent 3addea5 commit 32db6d6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions framework/Mime/lib/Horde/Mime/Part.php
Expand Up @@ -286,12 +286,15 @@ protected function _init()
*/
public function __clone()
{
reset($this->_parts);
while (list($k, $v) = each($this->_parts)) {
foreach ($this->_parts as $k => $v) {
$this->_parts[$k] = clone $v;
}

$this->_contentTypeParams = clone $this->_contentTypeParams;
$this->_contentTypeParams = new Horde_Support_CaseInsensitiveArray(
$this->_contentTypeParams->getArrayCopy()
);

$this->_contents = $this->_writeStream($this->_contents);
}

/**
Expand Down

0 comments on commit 32db6d6

Please sign in to comment.