Fix duplicated DTSTAMP entry in generated iTip (T1148)
Incopatibility with Sabre-VObject >= 3.3
This commit is contained in:
parent
a673d3c8f5
commit
0b17f376a8
2 changed files with 2 additions and 1 deletions
|
@ -997,7 +997,7 @@ class libvcalendar implements Iterator
|
|||
|
||||
// set DTSTAMP according to RFC 5545, 3.8.7.2.
|
||||
$dtstamp = !empty($event['changed']) && !empty($this->method) ? $event['changed'] : new DateTime('now', new \DateTimeZone('UTC'));
|
||||
$ve->add($this->datetime_prop($cal, 'DTSTAMP', $dtstamp, true));
|
||||
$ve->DTSTAMP = $this->datetime_prop($cal, 'DTSTAMP', $dtstamp, true);
|
||||
|
||||
// all-day events end the next day
|
||||
if ($event['allday'] && !empty($event['end'])) {
|
||||
|
|
|
@ -394,6 +394,7 @@ class libvcalendar_test extends PHPUnit_Framework_TestCase
|
|||
$this->assertContains('END:VTIMEZONE', $ics, "VTIMEZONE encapsulation END");
|
||||
|
||||
$this->assertContains('BEGIN:VEVENT', $ics, "VEVENT encapsulation BEGIN");
|
||||
$this->assertSame(2, substr_count($ics, 'DTSTAMP'), "Duplicate DTSTAMP (T1148)");
|
||||
$this->assertContains('UID:ac6b0aee-2519-4e5c-9a25-48c57064c9f0', $ics, "Event UID");
|
||||
$this->assertContains('SEQUENCE:' . $event['sequence'], $ics, "Export Sequence number");
|
||||
$this->assertContains('CLASS:CONFIDENTIAL', $ics, "Sensitivity => Class");
|
||||
|
|
Loading…
Add table
Reference in a new issue