From 2ef02e8144ceb911234cccf1de4ecbe91d2cf005 Mon Sep 17 00:00:00 2001 From: Yurii Date: Fri, 6 Feb 2026 11:40:11 +0200 Subject: [PATCH] fix warning --- application/Espo/Tools/Notification/RecordService.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.php index d670183cc3..769036a39e 100644 --- a/application/Espo/Tools/Notification/RecordService.php +++ b/application/Espo/Tools/Notification/RecordService.php @@ -472,12 +472,15 @@ class RecordService private function prepareSetFields(Notification $entity): void { - if ($entity->getRelated() && $entity->getData()?->relatedName) { - $entity->set('relatedName', $entity->getData()->relatedName); + $relatedName = $entity->getData()->relatedName ?? null; + $createdByName = $entity->getData()->createdByName ?? null; + + if ($entity->getRelated() && $relatedName !== null) { + $entity->set('relatedName', $relatedName); } - if ($entity->getCreatedBy() && $entity->getData()?->createdByName) { - $entity->set('createdByName', $entity->getData()->createdByName); + if ($entity->getCreatedBy() && $createdByName !== null) { + $entity->set('createdByName', $createdByName); } } }