Fatal Error with no until rule using SG_iCal_Freq->getNext #11

Open
buggedcom opened this Issue Aug 2, 2012 · 3 comments

Comments

Projects
None yet
3 participants

If the event is repetative but contains no until rule, SG_iCal_Freq::getNext runs endlessly. I suggest putting a limit in place to counter such events causing out of memory errors

I have exactly the same problem, did you find a fix for it?

yani- commented Nov 13, 2012

I am looking for a fix too.

Yes, however you don't need it if you set an "until" rule. However the patch is as follows


//      impose a upper ceiling.
        if(isset($this->rules['until']) === false)
        {
            $this->rules['until'] = $start + 315360000;
        }

Add the above to line# 100 in SG_iCal_Freq.php. It basically sets a hard upper limit of 10 years if the "until" rule is not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment