mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +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();
|
$content = $part->getContent();
|
||||||
if ($content === null) { // This should not be
|
if ($content === null) { // This should not be
|
||||||
throw new InvalidArgumentException(
|
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]);
|
$this->logger->debug('Importing message',['message' => $message]);
|
||||||
|
|
||||||
|
try {
|
||||||
$attachments = $message->getAttachments();
|
$attachments = $message->getAttachments();
|
||||||
|
}
|
||||||
|
catch (Throwable $e) {
|
||||||
|
$this->logger->error('Error while getting attachments',['exception' => $e]);
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
$anhang = count($attachments) > 0 ? 1 : 0;
|
$anhang = count($attachments) > 0 ? 1 : 0;
|
||||||
$mailacc = $this->mailAccount->getEmailAddress();
|
$mailacc = $this->mailAccount->getEmailAddress();
|
||||||
$mailaccid = $this->mailAccount->getId();
|
$mailaccid = $this->mailAccount->getId();
|
||||||
|
Loading…
Reference in New Issue
Block a user