u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
450 stars 144 forks source link

Events with no UID #172

Closed adrienfr closed 6 years ago

adrienfr commented 6 years ago

Description of the Issue:

I think there is an issue with events which don't have UID attribute, got this error:

Notice: Undefined index: UID

https://github.com/u01jmg3/ics-parser/blob/4fec38e3e04b47d49125c6dd217770384e1f88ac/src/ICal/ICal.php#L856

u01jmg3 commented 6 years ago

The UID property MUST be specified in the "VEVENT", "VTODO", "VJOURNAL" or "VFREEBUSY" calendar components.

adrienfr commented 6 years ago

True but since this check is done just before:

$checks[] = isset($event['UID']);

Events with no UID should be skipped or exception thrown no?

u01jmg3 commented 6 years ago

Only poor iCal software omits a UID but feel free to PR.

u01jmg3 commented 6 years ago

Closed by #173

adrienfr commented 6 years ago

Thanks @Big-Shark & @u01jmg3 !