File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -2988,20 +2988,22 @@ public function getDenormalizedData(string $calendarData): array {
29882988 $ classification = self ::CLASSIFICATION_PUBLIC ;
29892989 $ hasDTSTART = false ;
29902990 foreach ($ vObject ->getComponents () as $ component ) {
2991- if ($ component ->name !== 'VTIMEZONE ' ) {
2992- // Finding all VEVENTs, and track them
2993- if ($ component ->name === 'VEVENT ' ) {
2994- $ vEvents [] = $ component ;
2995- if ($ component ->DTSTART ) {
2996- $ hasDTSTART = true ;
2997- }
2998- }
2999- // Track first component type and uid
3000- if ($ uid === null ) {
3001- $ componentType = $ component ->name ;
3002- $ uid = (string )$ component ->UID ;
3003- }
2991+ $ allowedCoponents = $ this ->propertyMap ;
2992+ if (!in_array ($ component ->name , ['VEVENT ' , 'VJOURNAL ' , 'VTODO ' ])) {
2993+ continue ;
30042994 }
2995+
2996+ $ vEvents [] = $ component ;
2997+ if ($ component ->DTSTART ) {
2998+ $ hasDTSTART = true ;
2999+ }
3000+
3001+ // Track first component type and uid
3002+ if ($ uid === null ) {
3003+ $ componentType = $ component ->name ;
3004+ $ uid = (string )$ component ->UID ;
3005+ }
3006+
30053007 }
30063008 if (!$ componentType ) {
30073009 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