Skip to content

Commit

Permalink
Merge pull request #46 from Rotzbua/fix_argument
Browse files Browse the repository at this point in the history
fix invalid param
  • Loading branch information
Roman Ožana authored Mar 16, 2020
2 parents ad0bafe + 615909d commit 5c49e4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Freq.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ private function validDate($t) {
* @param int $offset
* @return int
*/
public function findEndOfPeriod($offset) {
public function findEndOfPeriod($offset = 0) {
return $this->findStartingPoint($offset, 1, false);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/recurring_events.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ foreach ($events[0]['EXDATES'] as $exDate) {


$results = $cal->parseFile(__DIR__ . '/cal/recur_instances_with_modifications.ics');
$events = $cal->getSortedEvents(true);
$events = $cal->getSortedEvents();

Assert::false(empty($events[0]['RECURRENCES']));
// the 12th entry is the modified event, related to the remaining recurring events
Expand Down Expand Up @@ -137,7 +137,7 @@ usort($trueEvents, function ($a, $b) {
return $a['DTSTART'] > $b['DTSTART'];
});

$events = $cal->getSortedEvents(true);
$events = $cal->getSortedEvents();
Assert::false(empty($events[0]['RECURRENCES']));
Assert::equal(count($trueEvents), count($events));
foreach($trueEvents as $index => $trueEvent) {
Expand Down

0 comments on commit 5c49e4f

Please sign in to comment.