diff --git a/packages/plugin/src/Library/Export/ExportCalendarToIcs.php b/packages/plugin/src/Library/Export/ExportCalendarToIcs.php index 9fe97e6..7a05537 100644 --- a/packages/plugin/src/Library/Export/ExportCalendarToIcs.php +++ b/packages/plugin/src/Library/Export/ExportCalendarToIcs.php @@ -68,13 +68,13 @@ private function combineExportString(Event $event, Carbon $date): string $description = null; $descriptionFieldHandle = $event->getCalendar()->descriptionFieldHandle; - if (isset($event->{$descriptionFieldHandle})) { + if ($descriptionFieldHandle && isset($event->{$descriptionFieldHandle})) { $description = $event->{$descriptionFieldHandle}; } $location = null; $locationFieldHandle = $event->getCalendar()->locationFieldHandle; - if (isset($event->{$locationFieldHandle})) { + if ($locationFieldHandle && isset($event->{$locationFieldHandle})) { $location = $event->{$locationFieldHandle}; } $title = $event->title;