Skip to content

Commit

Permalink
Take 2 on fix for Bug #14453
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Aug 27, 2016
1 parent 3caff29 commit d39dd96
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kronolith/lib/Kronolith.php
Expand Up @@ -322,6 +322,16 @@ static public function addEvents(&$results, &$event, $startDate, $endDate,
$timezone = date_default_timezone_get();
}

// If we are adding coverDates, but have no $endDate, default to
// +5 years from $startDate. This protects against hitting memory
// limit and other issues due to extremely long loops if a single event
// was added with a duration of thousands of years while still
// providing for reasonable alarm trigger times.
if ($coverDates && empty($endDate)) {
$endDate = clone $startDate;
$endDate->year += 5;
}

if ($event->recurs() && $showRecurrence) {
/* Recurring Event. */

Expand Down

0 comments on commit d39dd96

Please sign in to comment.