Problem/Motivation

When checking to see if the value of an entity's field has changed to determine if we need to update access records, we're not first checking to see if if this particular entity has the field resulting in the following error:

Error: Call to a member function getValue() on null in reference_map_adva_entity_presave() (line 84 of modules/contrib/reference_map_adva/reference_map_adva.module)

Proposed resolution

A check that the entity has the field needs to be performed priort to checking if the value of the entity's field has changed.

Remaining tasks

  • Write patch
  • Review patch
  • Commit

Comments

jantoine created an issue. See original summary.

jantoine’s picture

Status: Active » Needs review
StatusFileSize
new1.37 KB

The attached patch adds a check that the entity has the field in question.

  • jantoine committed feb6612 on 8.x-1.x
    Issue #3019196 by jantoine: A check that an entity has a field prior to...
jantoine’s picture

Status: Needs review » Fixed

This has been committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.