I've created a content type, and I've included a field that uses the Location module.

It worked perfectly when I first tested it now, but now on the top of all the content that I create I get these warnings:

* warning: array_filter() [function.array-filter]: The first argument should be an array in /home/lero4208/public_html/breedadvisor.com/home/modules/location/contrib/location_cck/location_cck.module on line 385.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/lero4208/public_html/breedadvisor.com/home/modules/location/contrib/location_cck/location_cck.module on line 385.
* warning: Invalid argument supplied for foreach() in /home/lero4208/public_html/breedadvisor.com/home/modules/location/location.module on line 1440.

It worked fine before, and I have no idea what changed.

Any help is greatly appreciated.

Comments

nickbwatson’s picture

If anyone else has had this problem please help, I have no idea what to do.

yitznewton’s picture

Hi Nick, I also had this problem on installing. I hacked the code of modules/location/contrib/location_cck/location_cck.module at line 385, entering the following to get rid of the error on my dev site:

  if (!is_array($item['location_settings']['display']['hide'])) {
    $item['location_settings']['display']['hide'] = array();
  }

The code at 385 is expecting an array. Use the hack at your own risk - I don't know what the ramifications are without more code spelunking.

cubixwebsolutions’s picture

Got the same problem. It was working fine initially but suddenly started showing this error. As of now ill just implement the hack mentioned above.. But I'm sure there must be something that must have caused this issue.

For me, I have uninstalled a whole bunch of unwanted modules and it occured after that. Maybe it is because of that. Maybe not. Clueless!

EDIT: Refer to the thread at #373465: Array errors in location_cck module . It has the same solution mentioned above in the form of a patch.

mrgoltra’s picture

+

JohnGu’s picture

Me too!It was working fine initially but suddenly started showing this error.

autopoietic’s picture

I also seem to have this problem - investigating

brycesenz’s picture

I am having this same issue. I will dig into the code as well once I have the time, but would love to hear what others think might be driving this problem.

jaypan’s picture

You guys are best off opening a thread in the issue cue for that module. The module developer isn't likely to find it here, unless he happens to check regularly.

Contact me to contract me for D7 -> D10/11 migrations.

Stalski’s picture

subscribing

uomeds’s picture

Stalski, post here:
http://drupal.org/node/373465