Skip to content

Commit 0961a0a

Browse files
authored
Merge pull request #769 from phil-davis/minor-code-20260615
fix: minor code fixes
2 parents 684e35e + 55cb62c commit 0961a0a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Recur/RRuleIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ protected function parseRRule($rrule): void
806806
case 'BYDAY':
807807
$value = (array) $value;
808808
foreach ($value as $part) {
809-
if (!preg_match('#^ (-|\+)? ([1-5])? (MO|TU|WE|TH|FR|SA|SU) $# xi', (string) $part)) {
809+
if (!preg_match('#^ (-|\+)? ([1-5])? (MO|TU|WE|TH|FR|SA|SU) $#xi', (string) $part)) {
810810
throw new InvalidDataException('Invalid part in BYDAY clause: '.$part);
811811
}
812812
}
@@ -946,7 +946,7 @@ protected function getMonthlyOccurrences(): array
946946
$byMonthDayResults[] = $monthDay;
947947
} else {
948948
// Negative values
949-
$byMonthDayResults[] = $startDate->format('t') + 1 + $monthDay;
949+
$byMonthDayResults[] = (int) $startDate->format('t') + 1 + $monthDay;
950950
}
951951
}
952952
}

0 commit comments

Comments
 (0)