Skip to content
Snippets Groups Projects
Commit 4b5e4f4b authored by Jürgen Haas's avatar Jürgen Haas
Browse files

Issue #3306135: Validate plugin has redundant code for "replace_tokens" field

parent 638f9f55
No related branches found
Tags 8.x-1.0
No related merge requests found
......@@ -451,16 +451,6 @@ class Eca extends ConfigEntityBase implements EntityWithPluginCollectionInterfac
$fields[$key] = mb_strtolower($fields[$key]) === 'yes';
}
}
// When "replace_tokens" exists, also convert that one back to boolean.
// @see \Drupal\eca\Service\Actions::getConfigurationForm()
if (isset($fields['replace_tokens'])) {
if (!empty($fields['replace_tokens']) && is_string($fields['replace_tokens'])) {
$fields['replace_tokens'] = mb_strtolower($fields['replace_tokens']) === 'yes';
}
else {
$fields['replace_tokens'] = (bool) $fields['replace_tokens'];
}
}
}
// Build form.
$form_state = new FormState();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment