diff --git a/inc/RRule.php b/inc/RRule.php index d69d138c..eb982143 100644 --- a/inc/RRule.php +++ b/inc/RRule.php @@ -817,10 +817,15 @@ class RepeatRule { private function GetMoreInstances($return_floating_times=false) { if ( $this->finished ) return; $got_more = false; - $loop_limit = 10; + $loop_limit = 100; $loops = 0; 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) ) { $this->current_base = clone($this->base); }