gui: catch exception for Zend_Mime_Decode::splitMessageStruct()

Change-Id: Ib02363d91e568bad89d958863cb61d23776975f0
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ 2017-05-14 08:16:17 +02:00
parent a831d8cd2e
commit caa7aba8e1

View File

@ -1,6 +1,7 @@
<?php
require 'Zend/Mime/Decode.php';
require 'Zend/Exception.php';
class ModelSearchMessage extends Model {
@ -258,7 +259,12 @@ class ModelSearchMessage extends Model {
$mime_parts = array();
if($boundary) {
$mime_parts = Zend_Mime_Decode::splitMessageStruct($body, $boundary);
try {
$mime_parts = Zend_Mime_Decode::splitMessageStruct($body, $boundary);
}
catch (Exception $e) {
syslog(LOG_INFO, "Caught exception: " . $e->getMessage());
}
} else {
$mime_parts[] = array('header' => $headers, 'body' => $body);
}