workbench_moderation_states_features_rebuild() and workbench_moderation_transitions_features_rebuild() call features_get_default() and pass the result directly to a foreach. However, features_get_default() can return boolean FALSE instead of an array, causing the following notice:

Invalid argument supplied for foreach() in workbench_moderation.features.inc

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dane Powell’s picture

Status: Active » Needs review
FileSize
1.3 KB
Dane Powell’s picture

justanothermark’s picture

I was also having this problem and while #1 does fix it, it seems that the Features module does it slightly differently when calling features_get_default:

E.g.
http://drupalcontrib.org/api/drupal/contributions%21features%21includes%...
http://drupalcontrib.org/api/drupal/contributions%21features%21includes%...
http://drupalcontrib.org/api/drupal/contributions%21features%21includes%...

However, I would be happy for either patch to be committed.

Dane Powell’s picture

Status: Needs review » Reviewed & tested by the community

#3 works for me... if that's how other features modules already handle it, let's follow their lead.

kwiliarty’s picture

I am encountering this problem, too, and it seems that the fix has not yet been incorporated upstream. Does anyone know whether or when it might happen?

Anonymous’s picture

We've been using this patch for 6+ months with no problems. Please merge.

maxocub’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev

This bug still exists in 3.x and this patch still resolves it. +1 for RTBC.

das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to the 3.x branch.

Status: Fixed » Closed (fixed)

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