Fix displaying parts under multipart/related as attachments when located in a multipa...
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 16 Nov 2009 22:19:12 +0000 (15:19 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 16 Nov 2009 22:32:53 +0000 (15:32 -0700)
imp/lib/Mime/Viewer/Alternative.php

index c65ab7b..b779982 100644 (file)
@@ -111,7 +111,9 @@ class IMP_Horde_Mime_Viewer_Alternative extends Horde_Mime_Viewer_Driver
                     $ret[$id] = $render[$id];
                     unset($display_ids[$id]);
                 }
-            } elseif ($disp_id != $val) {
+            } elseif (($disp_id != $val) && !array_key_exists($val, $ret)) {
+                // Need array_key_exists() here since we are checking if the
+                // key exists AND is null.
                 $ret[$val] = array(
                     'attach' => true,
                     'data' => '',