Problem/Motivation
Found config field fallback in tamper:strtotime with non-supported value.
Steps to reproduce
Create a ECA workflow that uses strtotime, once that the ECA workflow is triggered the database log will track the error above.
Proposed resolution
ModellerBpmnBase::prepareConfigFields() — when building BPMN plugin templates, it expects #type => 'checkbox' fields to have a PHP bool as their #default_value. NULL is not a bool and it generated the error log.
StrToTime::buildConfigurationForm() calls $this->getSetting('fallback') which returns NULL because defaultConfiguration() was never overridden to declare fallback => FALSE.
Fix: Add defaultConfiguration() to StrToTime.php returning ['date_format' => '', 'fallback' => FALSE].
| Comment | File | Size | Author |
|---|---|---|---|
| tamper-strtotime-default-configuration.patch | 726 bytes | blanca.esqueda |
Issue fork tamper-3582546
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 #2
blanca.esqueda commentedComment #6
mandclu commentedTechnically, the cited issue was fixed in #3560959: Plugin strToTime is missing defaultConfiguration() months ago, but the version of this code is syntactically superior in some subtle ways, so updating the code. Thanks for contributing!