Skip to content
Snippets Groups Projects
Commit 71c6a353 authored by Jürgen Haas's avatar Jürgen Haas Committed by Jürgen Haas
Browse files

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

parent 0e2936b1
Branches
Tags
1 merge request!221Issue #3306135: Validate plugin has redundant code for "replace_tokens" field
......@@ -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.
Please register or to comment