After upgrading to 7.x-1.1, I started receiving a notice on contexts using Context entity fields.

Error message
Notice: Undefined index: field_empty in context_condition_entity_field->execute() (line 96 of /Users/jbylsma/Sites/umdcmns.dev/sites/all/modules/contrib/context_entity_field/plugins/context_condition_entity_field.inc).

A quick scan of the source shows that the "Empty Field" checkbox has been added to the Context, which is why 7.x-1.1 implementations won't have a similar error. As a quick workaround, I've added an array_key_exists check to make sure 'empty_field' exists. You could write some functionality in a install file, but that's probably overkill.

Patch attached in the next post.

Comments

jbylsma’s picture

Patch attached.

mavimo’s picture

Hi @jbylsma maybe can be only required to re-save context where context entity field is used to suppress this notice.
I'll add array_key_exists check into next release.

Thanks for patch.

mavimo’s picture

Assigned: Unassigned » mavimo
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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