Give the gift of Drupal. All merchandise is 50% off through 2016.
@swentel pointed that Fieldinfo::getFieldMap()
- has a comment saying: "Filter out (...) instances on unknown entity types"
- yet contains no code that does anything about unknown entity types...
This did vaguely ring a bell about me doing some hairy back and forth dance in this area during
More specifically this happened in .
Digging around, I found out my local commits that:
- introduced the comment and some check around entity_get_info($instance_config['entity_type']) in getFieldMap()
- then, removed the check in getFieldMap(), added it in getBundleInstances() instead, but didn't update the comment in getFieldMap()
I think the reason was that $field->getBundles() relies on getFieldMap(), and is used for various housekeeping tasks, so it needed data whether the entity type was "real" or not.
It might be worth re-evaluating this after.