You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the UI you're using to populate Greg event data, it's possible to get into a state where Greg where it throws an exception while trying to calculate recurrences. Addressing things on the UI side is something that should happen, but as a last line of defense Greg shouldn't throw fatal errors when presented with malformed data.
Example: If you set up events with a "Once" frequency which indicates that no recurrence should happen, it can be possible to get an event into a state when Greg still thinks it should calculate recurrences.
STR:
Set up recurring event, including a "recur until" date
Switch this event to a frequency of "Once" (i.e. no recurrence)
If Greg attempts to calculate recurrences for this event, the combination of the non-valid "Once" frequency and a previously-set "recur until" date results in Greg throwing a fatal error
See post_to_calendar_series in greg/src/Event.php for a potential place to address this issue.
Expected behavior
Greg shouldn't throw a fatal error in this case
Actual behavior
Fatal error: Uncaught InvalidArgumentException: The FREQ rule part must be one of the following: SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY in /code/wp-content/plugins/greg/vendor/rlanvin/php-rrule/src/RRule.php:244
Steps to reproduce behavior
Set up recurring event, including a "recur until" date
Switch this event to a frequency of "Once" (i.e. no recurrence)
If Greg attempts to calculate recurrences for this event, the combination of the non-valid "Once" frequency and a previously-set "recur until" date results in Greg throwing a fatal error
What version of WordPress/PHP/Timber/Greg are you using?
How did you install Greg? (for example, via git clone, GitHub zip download, Composer/Packagist?)
The text was updated successfully, but these errors were encountered:
Based on the UI you're using to populate Greg event data, it's possible to get into a state where Greg where it throws an exception while trying to calculate recurrences. Addressing things on the UI side is something that should happen, but as a last line of defense Greg shouldn't throw fatal errors when presented with malformed data.
Example: If you set up events with a "Once" frequency which indicates that no recurrence should happen, it can be possible to get an event into a state when Greg still thinks it should calculate recurrences.
STR:
See
post_to_calendar_series
ingreg/src/Event.php
for a potential place to address this issue.Expected behavior
Greg shouldn't throw a fatal error in this case
Actual behavior
Fatal error: Uncaught InvalidArgumentException: The FREQ rule part must be one of the following: SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY in /code/wp-content/plugins/greg/vendor/rlanvin/php-rrule/src/RRule.php:244
Steps to reproduce behavior
What version of WordPress/PHP/Timber/Greg are you using?
How did you install Greg? (for example, via
git clone
, GitHub zip download, Composer/Packagist?)The text was updated successfully, but these errors were encountered: