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

Issue #3256407 by jurgenhaas: Action eca_entity_field_value doesn't properly...

Issue #3256407 by jurgenhaas: Action eca_entity_field_value doesn't properly read values from all field types
parent e1c62255
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,13 @@ class EntityFieldValue extends StringComparisonBase {
// @todo: How can we better get the field value for all sorts of field types?
$value = $entity->get($this->configuration['field_name'])->getValue();
if (is_array($value)) {
return $value[0]['value'] ?? '';
if (isset($value[0]['value'])) {
return $value[0]['value'];
}
if (isset($value[0]['target_id'])) {
return $value[0]['target_id'];
}
return '';
}
return (string) $value;
}
......
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