diff --git a/lib/Parser/MimeDir.php b/lib/Parser/MimeDir.php index ea5ac0326..9b36df6a9 100644 --- a/lib/Parser/MimeDir.php +++ b/lib/Parser/MimeDir.php @@ -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, diff --git a/tests/VObject/ReaderTest.php b/tests/VObject/ReaderTest.php index 0992806be..63d1dccf2 100644 --- a/tests/VObject/ReaderTest.php +++ b/tests/VObject/ReaderTest.php @@ -450,4 +450,28 @@ public function testReadXMLStream() $this->assertEquals('VCALENDAR', $result->name); $this->assertEquals(0, count($result->children())); } + + public function testReadDuplicateValue() + { + $input = <<assertSame($expected, $result->VEVENT->DTSTART->serialize()); + } }