Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Parser/MimeDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ protected function readProperty($line)
$property['parameters'][$lastParam] = $value;
} elseif (is_array($property['parameters'][$lastParam])) {
$property['parameters'][$lastParam][] = $value;
} else {
} elseif ($property['parameters'][$lastParam] !== $value) {
$property['parameters'][$lastParam] = [
$property['parameters'][$lastParam],
$value,
Expand Down
24 changes: 24 additions & 0 deletions tests/VObject/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,28 @@ public function testReadXMLStream()
$this->assertEquals('VCALENDAR', $result->name);
$this->assertEquals(0, count($result->children()));
}

public function testReadDuplicateValue()
{
$input = <<<ICS
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Proton Technologies//ProtonCalendar Beta//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20210903T154413Z
DTSTART;VALUE=DATE;VALUE=DATE:20210818
DTEND;VALUE=DATE;VALUE=DATE:20210819
SUMMARY:test
UID:[email protected]
LOCATION:home
END:VEVENT
END:VCALENDAR
ICS;

$result = Reader::read($input);
$expected = "DTSTART;VALUE=DATE:20210818\r\n";
$this->assertSame($expected, $result->VEVENT->DTSTART->serialize());
}
}