Hi,
I got this error message when trying to install CCK module on my WAMP server (Php 5.2.1 , MySQL 5.0.45, Apache 1.3.37) with Drupal 5.6.
warning: Invalid argument supplied for foreach() in C:\wamp\www\sites\all\modules\cck\content.module on line 760.
The content.module code is:
foreach ($formatter_info['field types'] as $field_type) {
Any idea why it's doing this ?
Thanks,
Hanly
Comments
Comment #1
yched commentedLooks like one of the field modules you've enabled has a malformed implementation of hook_field_formatter_info().
Formatters are supposed to declare a 'field types' key, which has to be an array.
It's not one of CCK's default field modules, so it's up to you to find which module it is amongst the ones you additionally installed, and report the bug over there.
Comment #2
shooommmm commentedThanks for the quick response.
Sorry, I couldn't your reply before.
Thanks to you and everyone who have contributed their valuable time and effort to Drupal and Drupal modules.
Cheers,
Hanly
Comment #3
sonicthoughts commentedI have the same error - seems to be coming from the date module.
Comment #4
wouter99999 commentedI've the same (with Drupal 5.7). Couldn't find out which module is causing this. Apparently it gets something like an object instead of an array from some module, but var_dump didn't reveal any info.
fixed it with adding if(is_array($formatter_info['field types'])){ } in content.module at line 760.