u01jmg3 / ics-parser

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

dtend array not initiated for an event #283

Closed nekromoff closed 3 years ago

nekromoff commented 3 years ago

:information_source:

  • Firstly, check you are using the latest version (dev-master) as the problem may already have been fixed.
  • It is essential to be provided with the offending iCal causing the parser to behave incorrectly.
    • Best to upload the iCal file directly to this issue
  • Create a Minimal, Complete, and Verifiable example
    • Minimal - use as little code as possible that still produces the same problem
    • Complete - provide all parts needed to reproduce the problem
    • Verifiable - test the code you're about to provide to make sure it reproduces the problem

Description of the Issue:

$event->dtend_array does not exist It should exist for every event, right? Even if empty...

Steps to Reproduce:

Event dump: image

u01jmg3 commented 3 years ago

As per the issue template:

It is essential to be provided with the offending iCal causing the parser to behave incorrectly.

nekromoff commented 3 years ago

Since it is a private calendar, this is often not an option. I can however provide complete object in question (with PII data removed).

nekromoff commented 3 years ago

hopefully the whole offending thing from ics file (xxxxx = redacted):

BEGIN:VEVENT
DTSTART;VALUE=DATE:20210303
DTSTAMP:20210325T095118Z
UID:xxxxxxxx
CREATED:20210310T142409Z
DESCRIPTION:
LAST-MODIFIED:20210310T142409Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:xxxxxxxxxx
TRANSP:TRANSPARENT
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT0H10M0S
END:VALARM
END:VEVENT
u01jmg3 commented 3 years ago

Thanks - so this is an event without an end date therefore the dtend_array key is not created/populated. This is expected.

nekromoff commented 3 years ago

Ok, thanks for the clarification.