Set the content-type correct so we can check on multipart/mixed in
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 24 May 2004 18:01:59 +0000 (18:01 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 24 May 2004 18:01:59 +0000 (18:01 +0000)
mailbox_display (printMessage).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7545 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_messages.php

index cdcb1c208b4caa8bbb2c86e67b9e88c89a1fbb59..2f14a9084f5aca13ad6f969cde462a3ce81e9227 100755 (executable)
@@ -683,9 +683,12 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $show_num=false,
                                     $type = substr($type, 0, $pos);
                                 }
                                 $type = explode("/", $type);
                                     $type = substr($type, 0, $pos);
                                 }
                                 $type = explode("/", $type);
-                                if(!is_array($type)) {
+                                if(!is_array($type) || count($type) < 2) {
                                     $msg['TYPE0'] = 'text';
                                     $msg['TYPE1'] = 'plain';
                                     $msg['TYPE0'] = 'text';
                                     $msg['TYPE1'] = 'plain';
+                                } else {
+                                    $msg['TYPE0'] = strtolower($type[0]);
+                                    $msg['TYPE1'] = strtolower($type[1]);
                                 }
                                 break;
                             case 'received':
                                 }
                                 break;
                             case 'received':