Skip to content

Commit

Permalink
throw InvalidDataException when finding invalid RRULE part
Browse files Browse the repository at this point in the history
  • Loading branch information
mathroc authored Oct 11, 2024
1 parent 3ff67e1 commit 3773a76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Property/ICalendar/Recur.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, ',')) {
Expand Down

0 comments on commit 3773a76

Please sign in to comment.