Features tries to access a non-existent array key, causing a notice:

WD php: Notice: Undefined index:  widget_active in content_features_rebuild() (line 161 of /sites/all/modules/features/includes/features.content.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joshuajabbour’s picture

Status: Active » Needs review
FileSize
802 bytes
joshuajabbour’s picture

FileSize
658 bytes

wrong issue, ignore this patch...

beeradb’s picture

Status: Needs review » Reviewed & tested by the community

This fixes the notices for me, is dead simple, and is best practice anyway. RTBC on #1.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.52 KB

Here's another quick patch that fixes the same logic error in other places.

mikeryan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, and eliminates tons of unnecessary notices when running simpletests for me.

wojtha’s picture

subscribing

ryan_courtnage’s picture

Patch in #4 is good.

bleen’s picture

bump / sub

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

Sknight17’s picture

I'm noticing the patch in #4 hides the 'state' when using drush in the command line. The state will still show up in the UI. However, this patch makes it impossible for those that use 'drush fl' as apart of their workflow. Is anyone else experiencing the same issue?

bcmiller0’s picture

we are hitting this case, but the actual data on hitting it shows $existing_instance[0]['widget_active']. Which seems like the patch avoids it but does a query update when it doesn't need to. as the widget_active is already set "1" but the existing_instance variable is an array when maybe shoudn't be.