From 639d43bc57c2c4001b0f3fd775daf663ecfb3929 Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Tue, 7 Nov 2023 11:04:38 +0100 Subject: [PATCH] fixup! fix: add VTIMEZONE to Appointments --- lib/Service/Appointments/TimezoneGenerator.php | 3 ++- psalm.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Service/Appointments/TimezoneGenerator.php b/lib/Service/Appointments/TimezoneGenerator.php index 308a783949..36bb7fe80f 100644 --- a/lib/Service/Appointments/TimezoneGenerator.php +++ b/lib/Service/Appointments/TimezoneGenerator.php @@ -48,6 +48,7 @@ namespace OCA\Calendar\Service\Appointments; +use Sabre\VObject\Component; use Sabre\VObject\Component\VCalendar; use Sabre\VObject\Component\VTimeZone; use Sabre\VObject\TimeZoneUtil; @@ -132,7 +133,7 @@ public function generateVtimezone(string $timezone, int $from, int $to): ?VTimeZ // add X-MICROSOFT-CDO-TZID if available $microsoftExchangeMap = array_flip(TimeZoneUtil::$microsoftExchangeMap); - if (array_key_exists($tz->getName(), $microsoftExchangeMap)) { + if (!empty($microsoftExchangeMap) && array_key_exists($tz->getName(), $microsoftExchangeMap)) { $vtimezone->add('X-MICROSOFT-CDO-TZID', $microsoftExchangeMap[$tz->getName()]); } diff --git a/psalm.xml b/psalm.xml index 0575c0df0f..46aa449516 100644 --- a/psalm.xml +++ b/psalm.xml @@ -30,6 +30,7 @@ +