mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:31:59 +01:00
Added error handling to $parts array iteration
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
553ebb4f95
commit
1ca4d3b8c3
@ -180,8 +180,8 @@ class ModelSearchMessage extends Model {
|
||||
'text/html' => ''
|
||||
);
|
||||
|
||||
if(is_array($parts)) {
|
||||
for($i=0; $i<count($parts); $i++) {
|
||||
|
||||
$body = Piler_Mime_Decode::fixMimeBodyPart($parts[$i]['headers'], $parts[$i]['body']);
|
||||
|
||||
if($parts[$i]['headers']['content-type']['type'] == 'text/html') {
|
||||
@ -190,7 +190,9 @@ class ModelSearchMessage extends Model {
|
||||
else {
|
||||
$this->message['text/plain'] .= $body;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$this->message_array[CONST_TEXTPLAIN] = 'EMPTY_MESSAGE_BODY';
|
||||
}
|
||||
|
||||
return array('from' => $from,
|
||||
|
Loading…
Reference in New Issue
Block a user