Invalid argument supplied for foreach() in /home/checkout/drupal-6.19/sites/all/modules/features/features.module on line 272.
Invalid argument supplied for foreach() in /home/checkout/drupal-6.19/sites/all/modules/features/features.module on line 386.
Invalid argument supplied for foreach() in /home/checkout/drupal-6.19/sites/all/modules/features/features.export.inc on line 310.
I've added some checks on those lines (if(is_array... ) but i'm not sure that is the correct fix. this happens after calling module_invoke and module_implements (which is supposed to return an array) ..
After adding the ifs, I got:
Invalid argument supplied for foreach() in /home/checkout/drupal-6.19/sites/all/modules/features/features.module on line 390.
Same problem there.
After adding another if, there were no more warnings.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | features-890412.patch | 919 bytes | dagmar |
Comments
Comment #1
yhahn commentedAll of these warnings look like a case of a badly declare
hook_features_api()somewhere in your codebase. Do you want to do some debugging and track down where that declaration is?Comment #2
lucascaro commentedsure, I'll report back here.
Comment #3
that0n3guy commentedI get these errors when using this patch: https://drupal.org/node/624018#comment-3270940 with wysiwyg untill I enable exportables... then they go away.
Comment #4
dagmarI'm seeing the same issue:
It seems to be related to this commit: http://drupal.org/node/884624#comment-3349396
Before this commit, list_callback function should return a list of objects. After the commit, list_callback have to return an array.
I'm using the 'old' method in Input Formats module and in the Wysiwyg Ctools patch. My question is: we have to modify Features module? or I have to modify input formats module and the wysiwyg patch?
Comment #5
dagmarIMO this patch will be enough and is compatible with both kinds of list_callbacks returns, objects and keys.
Comment #6
yhahn commented@dagmar: Nope, the list callback should provide an array of
machine_name => human readablefor each exportable object. The patch usesarray_keys()which basically throws out the human readable names -- not good.My suggestion is to make a fix upstream to your list callback in Input Formats.
Comment #7
dagmarSo, assuming input formats is the raise of this issue. I have committed a patch to fix the problem. http://drupal.org/cvs?commit=414114
Please re-open if this issue persist.