diff --git a/core/action.class.inc.php b/core/action.class.inc.php index eea2d6f52..4777a0925 100644 --- a/core/action.class.inc.php +++ b/core/action.class.inc.php @@ -677,10 +677,11 @@ class ActionEmail extends ActionNotification if (isset($aContextArgs['attachments'])) { $aAttachmentReport = array(); + /** @var \ormDocument $oDocument */ foreach($aContextArgs['attachments'] as $oDocument) { $aMessageContent['attachments'][] = ['data' => $oDocument->GetData(), 'filename' => $oDocument->GetFileName(), 'mime_type' => $oDocument->GetMimeType()]; - $aAttachmentReport[] = array($oDocument->GetFileName(), $oDocument->GetMimeType(), strlen($oDocument->GetData())); + $aAttachmentReport[] = array($oDocument->GetFileName(), $oDocument->GetMimeType(), strlen($oDocument->GetData() ?? '')); } $oLog->Set('attachments', $aAttachmentReport); }