mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-24 13:40:29 +01:00
Ticket system attachements exception handling
This commit is contained in:
parent
0eb3ba50f2
commit
9daaf58281
@ -161,7 +161,7 @@ class MailAttachmentData implements MailAttachmentInterface
|
||||
$content = $part->getContent();
|
||||
if ($content === null) { // This should not be
|
||||
throw new InvalidArgumentException(
|
||||
sprintf('content is null "%s"', print_r($part,true))
|
||||
sprintf('content is null "%s"', substr(print_r($part,true),1000))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -593,7 +593,14 @@ class TicketImportHelper
|
||||
|
||||
$this->logger->debug('Importing message',['message' => $message]);
|
||||
|
||||
$attachments = $message->getAttachments();
|
||||
try {
|
||||
$attachments = $message->getAttachments();
|
||||
}
|
||||
catch (Throwable $e) {
|
||||
$this->logger->error('Error while getting attachments',['exception' => $e]);
|
||||
return(false);
|
||||
}
|
||||
|
||||
$anhang = count($attachments) > 0 ? 1 : 0;
|
||||
$mailacc = $this->mailAccount->getEmailAddress();
|
||||
$mailaccid = $this->mailAccount->getId();
|
||||
|
Loading…
Reference in New Issue
Block a user