Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2407435-field_collection-entity-access-null-1.patch | 689 bytes | mradcliffe |
Comments
Comment #1
mradcliffeThis probably also needs tests for security unless entity module's tests are sufficient.