Skip to content
Snippets Groups Projects

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

Merged Jürgen Haas requested to merge issue/eca-3306135:3306135-validate-plugin-has into 1.1.x
1 file
+ 0
10
Compare changes
  • Side-by-side
  • Inline
+ 0
10
@@ -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();
Loading