EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix warning
Yurii2ef02e8144ce
diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.phpindex d670183cc3..769036a39e 100644--- a/application/Espo/Tools/Notification/RecordService.php+++ b/application/Espo/Tools/Notification/RecordService.php@@ -472,12 +472,15 @@ class RecordServiceprivate 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);}}}