u01jmg3 / ics-parser

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

Fatal error: Uncaught Exception: Invalid iCal date format with "DTEND:None" in data #340

Open room34 opened 1 week ago

room34 commented 1 week ago

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

u01jmg3 commented 1 week ago

Feel free to propose a PR. Note v3.4.1 is the latest version.