Skip to content

Conversation

@NlL5
Copy link

@NlL5 NlL5 commented Sep 8, 2025

The following code would not work. It would throw Fatal error: Uncaught Error: Call to a member function format() on null in /srv/www/Projekte/Web/mms-web/vendor/simshaun/recurr/src/Recurr/Transformer/TextTransformer.php:110 :

$textTransformer = new TextTransformer();
echo $textTransformer->transform(new Rule('FREQ=YEARLY'));

It will only work with and additional BYDAY, BYMONTHDAY,... or a start date in the Rule. However, I think it makes sense to be able to retrieve the text "yearly" for the above Rule. (As returned for the "daily", "monthly" or "hourly" rule without start date.)

The same applies to "weekly".

I added a simple check to fix the PHP error.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant