Need to clone Horde_Mime_Part so later changes aren't saved in cache
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 30 Jun 2009 00:36:34 +0000 (18:36 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 30 Jun 2009 00:36:47 +0000 (18:36 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Base.php

index 4a14500..f4adfd0 100644 (file)
@@ -2574,7 +2574,11 @@ abstract class Horde_Imap_Client_Base
                 switch ($label) {
                 case 'structure':
                     if (isset($cf[Horde_Imap_Client::FETCH_STRUCTURE])) {
-                        $tmp[is_array($val) ? 'HICstructa' : 'HICstructm'] = $val;
+                        if (is_array($val)) {
+                            $tmp['HICstructa'] = $val;
+                        } else {
+                            $tmp['HICstructm'] = clone $val;
+                        }
                     }
                     break;