File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2995,20 +2995,21 @@ public function getDenormalizedData(string $calendarData): array {
29952995 $ classification = self ::CLASSIFICATION_PUBLIC ;
29962996 $ hasDTSTART = false ;
29972997 foreach ($ vObject ->getComponents () as $ component ) {
2998- if ($ component ->name !== 'VTIMEZONE ' ) {
2999- // Finding all VEVENTs, and track them
3000- if ($ component ->name === 'VEVENT ' ) {
3001- $ vEvents [] = $ component ;
3002- if ($ component ->DTSTART ) {
3003- $ hasDTSTART = true ;
3004- }
3005- }
3006- // Track first component type and uid
3007- if ($ uid === null ) {
3008- $ componentType = $ component ->name ;
3009- $ uid = (string )$ component ->UID ;
3010- }
2998+ if (!in_array ($ component ->name , ['VEVENT ' , 'VJOURNAL ' , 'VTODO ' ])) {
2999+ continue ;
30113000 }
3001+
3002+ $ vEvents [] = $ component ;
3003+ if ($ component ->DTSTART ) {
3004+ $ hasDTSTART = true ;
3005+ }
3006+
3007+ // Track first component type and uid
3008+ if ($ uid === null ) {
3009+ $ componentType = $ component ->name ;
3010+ $ uid = (string )$ component ->UID ;
3011+ }
3012+
30123013 }
30133014 if (!$ componentType ) {
30143015 throw new BadRequest ('Calendar objects must have a VJOURNAL, VEVENT or VTODO component ' );
You can’t perform that action at this time.
0 commit comments