Actions that provide non-string default values break UI
Problem/Motivation
Actions may define a non-string default configuration value (for example NULL). This breaks ECA UI, because the ServiceTrait has a strict type definition for the default value when preparing the fields to display:
TypeError: Argument 6 passed to Drupal\eca\Service\Actions::optionsField() must be of the type string, null given, called in .../eca/src/Service/ServiceTrait.php on line 94 in Drupal\eca\Service\Actions->optionsField() (line 166 of .../eca/src/Service/ServiceTrait.php).
Steps to reproduce
Proposed resolution
Type-cast the default value before passing it to the optionsField method.
Remaining tasks
Fix the bug.
User interface changes
API changes
Data model changes
Edited by drupalbot