ics-parser
ics-parser copied to clipboard
Fatal error: Uncaught Exception: Invalid iCal date format with "DTEND:None" in data
PHP Version
8.1
PHP date.timezone
America/Chicago
ICS Parser Version
3.4.0
Operating System
Linux
Description
Recently I've heard from a few users that they're getting this error:
Fatal error: Uncaught Exception: Invalid iCal date format.
I've traced it back to one particular calendar vendor whose output includes the line DTEND:None when events do not have an end date/time set.
It's my understanding/assumption that this is not a valid DTEND value. But, nevertheless, it's showing up in feeds.
Steps to Reproduce
BEGIN:VCALENDAR PRODID:Redacted VERSION:2.0 BEGIN:VEVENT SUMMARY:Redacted DTSTART;TZID=Europe/Berlin:20230112T180000 DTEND:None DTSTAMP:20240627T162224Z UID:2e408c67c5c649bd3128 CLASSIFICATION:Redacted DESCRIPTION:Redacted LOCATION:Redacted URL:https://example.com END:VEVENT END:VCALENDAR
Feel free to propose a PR. Note v3.4.1 is the latest version.
PR #342 could be reworked to ignore an event with DTEND:None but this would mean it wouldn't be processed which might not be the desired outcome.