From 16b3e625874dff1e8a6dcd8cfc6d0c0e6ca3eeb6 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 29 Jan 2024 13:07:48 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B06037=20-=20PHP=208.2:=20Migrate=20usage?= =?UTF-8?q?=20of=20strlen()=20with=20null=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/action.class.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }