The entity_access() function has three possible return values although the return type is documented as boolean. The possible return values are:

- TRUE: access granted.
- FALSE: access denied.
- NULL: "If the entity type does not specify any access information"

The logic operation NULL && TRUE returns FALSE, and thus field_collection_item_access denies access when it should grant access. The condition should account for NULL values in $entity_access.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mradcliffe’s picture

Status: Active » Needs review
FileSize
689 bytes

This probably also needs tests for security unless entity module's tests are sufficient.