Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible filter days before and after bug #216

Closed
roelVerdonschot opened this issue Apr 26, 2019 · 2 comments
Closed

Possible filter days before and after bug #216

roelVerdonschot opened this issue Apr 26, 2019 · 2 comments
Labels

Comments

@roelVerdonschot
Copy link
Contributor

roelVerdonschot commented Apr 26, 2019

When using the before and after filter events inside the range were removed, I had to update 1 line and add an extra check (parentheses) to make it work.

I changed this line in removeLastEventIfOutsideWindowAndNonRecurring()

  • if (!isset($lastEvent['RRULE']) || $lastEvent['RRULE'] === '' && $this->doesEventStartOutsideWindow($lastEvent)) {

to

  • if ((!isset($lastEvent['RRULE']) || $lastEvent['RRULE'] === '') && $this->doesEventStartOutsideWindow($lastEvent)) {

and had to add this if to the $events foreach in reduceEventsToMinMaxRange()

if ($anEvent === null) {
    unset($events[$key]);
    continue;
}

I'm using v2.1.11

@u01jmg3
Copy link
Owner

u01jmg3 commented Apr 26, 2019

Thanks for letting me know.

  • What iCal broke the parser and required the changes you mention above?
  • Can you send in a PR with your changes?

@u01jmg3 u01jmg3 self-assigned this Apr 26, 2019
roelVerdonschot added a commit to roelVerdonschot/ics-parser that referenced this issue Apr 28, 2019
@roelVerdonschot
Copy link
Contributor Author

I've send in a PR but I cannot send the iCal because of company policies/privacy reasons.

@u01jmg3 u01jmg3 changed the title Possible filter days before and after bug? Possible filter days before and after bug May 12, 2019
@u01jmg3 u01jmg3 closed this as completed May 12, 2019
@u01jmg3 u01jmg3 removed their assignment May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants