Skip to content

Commit

Permalink
Revert this non-sense!
Browse files Browse the repository at this point in the history
We already cast to (int) later on. I can of course be EVEN more thorough but is_int makes webform generated NODE IDs be skipped. BAD!
  • Loading branch information
DiegoPino committed Nov 7, 2022
1 parent d1b2560 commit 911f8cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Field/StrawberryFieldEntityComputedItemList.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function computeValue() {
// dr:fid.
if (isset($flatvalues['dr:nid']) && !empty($flatvalues['dr:nid'])) {
$entity_ids = (array) $flatvalues['dr:nid'];
$node_entities = array_filter($entity_ids, 'is_int');
$node_entities = array_filter($entity_ids, 'is_scalar');
}
// Also get mapped ones
if (isset($values["ap:entitymapping"]["entity:node"]) &&
Expand All @@ -36,7 +36,7 @@ protected function computeValue() {
foreach ($jsonkeys_with_node_entities as $jsonkey_with_node_entity) {
if (isset($values[$jsonkey_with_node_entity]) && !empty($values[$jsonkey_with_node_entity])) {
$entity_ids = (array) $values[$jsonkey_with_node_entity];
$node_entities = array_merge($node_entities, array_filter($entity_ids, 'is_int'));
$node_entities = array_merge($node_entities, array_filter($entity_ids, 'is_scalar'));
}
}
}
Expand Down

0 comments on commit 911f8cb

Please sign in to comment.