diff --git a/lib/Property/ICalendar/Recur.php b/lib/Property/ICalendar/Recur.php index 9a1e9e643..b229e87ab 100644 --- a/lib/Property/ICalendar/Recur.php +++ b/lib/Property/ICalendar/Recur.php @@ -189,7 +189,14 @@ public static function stringToArray(string $value): array if (empty($part)) { continue; } - list($partName, $partValue) = explode('=', $part); + + $parts = explode('=', $part); + + if (count($parts) !== 2) { + throw new InvalidDataException('The supplied iCalendar RRULE part is incorrect: '.$part); + } + + list($partName, $partValue) = $parts; // The value itself had multiple values.. if (false !== strpos($partValue, ',')) {