- 
                Notifications
    You must be signed in to change notification settings 
- Fork 50
Open
Description
Consider the following code:
$ical = new ZCiCal();
$vevent = new ZCiCalNode( 'VEVENT', $ical->curnode );
$vevent->addNode( new ZCiCalDataNode( 'RDATE:20180310' ) );
$vevent->addNode( new ZCiCalDataNode( 'RDATE:20180324' ) );
$ical-export();
The above results in output like:
BEGIN:VCALENDAR
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
VERSION:2.0
BEGIN:VEVENT
RDATE:20180324
RDATE:20180324
END:VEVENT
END:VCALENDAR
which is incorrect: notice that both RDATE nodes in the output contain the value of last RDATE node added.
The correct output should be:
BEGIN:VCALENDAR
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
VERSION:2.0
BEGIN:VEVENT
RDATE:20180310
RDATE:20180324
END:VEVENT
END:VCALENDAR
I've got a fix to ZCiCalNode::addNode() that results in the correct output for this particular case.  I can submit a PR.  However, since I'm really new to writing code to generate iCalendar feeds I'm not sure whether my fix will break other cases, and since you don't have any unit tests it's hard for me to tell.
Should I submit the PR anyway?
Metadata
Metadata
Assignees
Labels
No labels