contao/test — Issue #524: repeated Events can crash Typolight
Author: computino
Created: 2011-11-29 06:22:22+00:00
State: open
Labels: calendar, Defect

When using repeated events without an end date and with unlimited repetitions the event list crashes (in an endless loop over the recurring events). Happened somewhere between 2.6.4 and 2.6.6.

The faulty code is Events.php ->getAllEvents from line 143 with the following conditions:
* there is at least one event with no end date or time to be listed
* its repeated
* with no. of reccurences = 0 (endless)
In this case $objEvents->recurrences is = 0 and $objEvents->endTime = 0 and the loop is never finished, the breakout line (the first if within the while-block) never triggers.

```
while ($objEvents->endTime < $intEnd)
{
if ($objEvents->recurrences > 0 && $count++ >= $objEvents->recurrences)
{
break;
}
[..]
}
```

Works at the demo also.

--- _Originally created on February 17th, 2009, at 12:25am (ID 524)_