Working on a site locally and was adding a feature and this Warning popped up. So far it doesn't seem to break anything but it shows up whether my features are enabled or not.
Warning: Invalid argument supplied for foreach() in features_admin_form() (line 332 of /Users/james/Sites/localhost/MYSITE/sites/all/modules/contrib/features/features.admin.inc).
Comments
Comment #1
febbraro commentedI dont have this problem. Do you have any features that do not have any dependencies declared in their .info files?
Comment #2
jnettikI've only used on feature on this site. It had dependencies but the error also shows without any other features enabled. Only the module.
Comment #3
febbraro commentedThat main pages process any Feature in the system, enabled or not, b/c it shows Features there that can be enabled. So the error could be in one of the disabled features. Can you track down with one and debug it a little bit more?
Comment #4
jnettikI only had one feature running and I removed it completely, still got the warning. I also checked to see if it was the features_tests feature that comes with the module. Without both of those the warning still appeared.
Comment #5
tomwrobel commentedJust as a quick follow-up. I was having this issue, and it turned out to be incorrectly declared dependencies in a non-features related module.
The function on line 332 looks for all dependencies in all modules, not just in features modules.
In the relevant module.info file, I had dependencies = X rather than dependencies[] = X.
Comment #6
gagarine commentedSame than 5. Not sure it has to be fixed...
Comment #7
hefox commentedI'd be tempted to won't fix it
Comment #8
gagarine commentedCore do check if it's an array http://api.drupal.org/api/drupal/includes!module.inc/function/_module_build_dependencies/7 I think we should do the same to keep consistency.
For my point of view core should check than the .info is valid and give a nice warning if not when the module is activated. But that's a core feature request.
Comment #9
mpotter commentedPlease reopen if this still occurs in the 7.x-rc2 release.