Skip to content

Commit

Permalink
Fix iteration through certain MIME parts with deeply embedded subparts
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Apr 23, 2015
1 parent 2709bfd commit cd41ccc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion imp/lib/Contents/Message.php
Expand Up @@ -561,10 +561,16 @@ protected function _getInlineOutput(array $options)
: null;
$show_parts = $prefs->getValue('parts_display');

foreach ($this->contents->getMIMEMessage()->partIterator() as $part) {
/* Need to iterate through entire part list first, since render
* methods may break iteration when they iterate through subparts. */
$p_list = array();
foreach ($this->contents->getMIMEMessage()->partIterator() as $val) {
$mime_id = $part->getMimeId();
$i[] = $mime_id;
$p_list[] = $val;
}

foreach ($p_list as $mime_id => $part) {
if (isset($display_ids[$mime_id]) ||
isset($atc_parts[$mime_id])) {
continue;
Expand Down

0 comments on commit cd41ccc

Please sign in to comment.