EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
ICS: No location if empty
Yurii6a0ee9cc67c5
diff --git a/application/Espo/Modules/Crm/Business/Event/Ics.php b/application/Espo/Modules/Crm/Business/Event/Ics.phpindex f6cc187e94..300621a098 100644--- a/application/Espo/Modules/Crm/Business/Event/Ics.php+++ b/application/Espo/Modules/Crm/Business/Event/Ics.php@@ -118,11 +118,16 @@ class Ics$organizerPart = "ORGANIZER;{$this->preparePerson($this->organizer[0], $this->organizer[1])}";}+ $locationValuePart = $this->escapeString($this->formatMultiline($this->address));++ $locationPart = $locationValuePart ?+ "LOCATION:$locationValuePart\r\n" : '';+$body ="DTSTART:{$this->formatTimestamp($this->startDate)}\r\n" ."DTEND:{$this->formatTimestamp($this->endDate)}\r\n" .- "SUMMARY:{$this->escapeString($this->summary)}\r\n" .- "LOCATION:{$this->escapeString($this->address)}\r\n" .+ "SUMMARY:{$this->escapeString($this->formatMultiline($this->summary))}\r\n" .+ $locationPart .$organizerPart ."DESCRIPTION:{$this->escapeString($this->formatMultiline($this->description))}\r\n" ."UID:$this->uid\r\n" .@@ -155,6 +160,7 @@ class Icsreturn date('Ymd\THis\Z', $timestamp);}+private function escapeString(?string $string): string{if (!$string) {