Problem/Motivation
There are several places in the module where possibly NULL values are passed to string functions, which will throw an error.
Steps to reproduce
This affects developers building functionality on top of the module that creates events programmatically, rather than events created through the UI.
For example, if an event series is created programmatically with daily recurrence and the end_time value is left NULL because the event is using duration instead—which would seem to be a legal thing to do, since end_time is not a required field—then passing this event to DailyRecurringDate::convertEntityConfigToArray will raise an error when it tries to call $config['end_time'] = strtoupper($event->getDailyEndTime());
Proposed resolution
Protect possibly NULL values with the null-coalescing operator when passing to string functions. For example, strtoupper($event->getDailyEndTime() ?? '');
Issue fork recurring_events-3594934
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
muriqui commentedComment #4
eric.napier commentedTested in an integration environment with Recurring Events enabled, and executed PHPUnit tests to test scenarios that replicate the issue described in "Problem/Motivation" and "Steps to reproduce" in this ticket. All tests passed and code reviewed for standards / best practice.
Comment #6
muriqui commented