From 32d0477202b69083c40ce456f4f72e31310041d9 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Tue, 27 Apr 2010 16:18:45 +1000 Subject: [PATCH] maybe fixed then null issue for non-mime type declared attachments --- vendors/shells/vault.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vendors/shells/vault.php b/vendors/shells/vault.php index 4419603d..a0f8eb32 100755 --- a/vendors/shells/vault.php +++ b/vendors/shells/vault.php @@ -109,7 +109,10 @@ class VaultShell extends Shell { if( ($attachment['type'] != 'text/html') && ($attachment['type'] != 'multipart/mixed') && ($attachment['type'] != 'multipart/alternative') && ($attachment['type'] != 'multipart/report') && - ($attachment['type'] != 'text/plain') + ($attachment['type'] != 'text/plain') && + ($attachment['type'] != 'text/rfc822-headers') && + ($attachment['type'] != 'message/delivery-status') + ) { $this->EmailAttachment->create(); @@ -197,6 +200,11 @@ class VaultShell extends Shell { $words = explode(' ', $output[$i]); $type = explode('=', $words[1]); $name = explode('=', $words[2]); + + if($type == "" || $name == "") { + next; + } + $attachments[$j]['type'] = $type[1]; $attachments[$j]['name'] = $name[1]; echo "in message number $msg_number ($uniqid): found attachment ".$attachments[$j]['name'].' '.$attachments[$j]['type']."\n";