mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Increase loop limit for finding next instance for Recurrence Rules.
With complex rules, it make take more than 10 expansions to find the next valid date. Increase this to 100, it doesn't slow things down too much. I've also added some additional error logging if this issue occurs again. Closes #268.
This commit is contained in:
parent
0fdb3ff558
commit
d93a5196b8
@ -817,10 +817,15 @@ class RepeatRule {
|
|||||||
private function GetMoreInstances($return_floating_times=false) {
|
private function GetMoreInstances($return_floating_times=false) {
|
||||||
if ( $this->finished ) return;
|
if ( $this->finished ) return;
|
||||||
$got_more = false;
|
$got_more = false;
|
||||||
$loop_limit = 10;
|
$loop_limit = 100;
|
||||||
$loops = 0;
|
$loops = 0;
|
||||||
if ( $return_floating_times ) $this->base->setAsFloat();
|
if ( $return_floating_times ) $this->base->setAsFloat();
|
||||||
while( !$this->finished && !$got_more && $loops++ < $loop_limit ) {
|
while( !$this->finished && !$got_more) {
|
||||||
|
if ($loops++ > $loop_limit ) {
|
||||||
|
dbg_error_log ('ERROR', "RRULE, loop limit has been hit in GetMoreInstances, this probably needs to be increased (loop_limit: %d)", $loop_limit);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isset($this->current_base) ) {
|
if ( !isset($this->current_base) ) {
|
||||||
$this->current_base = clone($this->base);
|
$this->current_base = clone($this->base);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user