I am using location on my site. When I try to register as a new user, it works, but provides the following error:

    * warning: array_filter() [function.array-filter]: The first argument should be an array in /home/uomeds/public_html/sites/all/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/uomeds/public_html/sites/all/modules/location/contrib/location_cck/location_cck.module on line 385.
    * warning: Invalid argument supplied for foreach() in /home/uomeds/public_html/sites/all/modules/location/location.module on line 1440.
    * warning: array_filter() [function.array-filter]: The first argument should be an array in /home/uomeds/public_html/sites/all/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/uomeds/public_html/sites/all/modules/location/contrib/location_cck/location_cck.module on line 385.
    * warning: Invalid argument supplied for foreach() in /home/uomeds/public_html/sites/all/modules/location/location.module on line 1440.
    * warning: array_filter() [function.array-filter]: The first argument should be an array in /home/uomeds/public_html/sites/all/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/uomeds/public_html/sites/all/modules/location/contrib/location_cck/location_cck.module on line 385.
    * warning: Invalid argument supplied for foreach() in /home/uomeds/public_html/sites/all/modules/location/location.module on line 1440.
    * warning: array_filter() [function.array-filter]: The first argument should be an array in /home/uomeds/public_html/sites/all/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/uomeds/public_html/sites/all/modules/location/contrib/location_cck/location_cck.module on line 385.
    * warning: Invalid argument supplied for foreach() in /home/uomeds/public_html/sites/all/modules/location/location.module on line 1440.

So it seems there is something wrong with my lines 385 in location_cck.module and 1440 in location.module.

Does anyone know what the problem is or how I can fix it?

Thanks.

Comments

uomeds’s picture

line 385

'hide' => array_keys(array_filter($item['location_settings']['display']['hide'])),

line 1440

foreach($variables['hide'] as $key) {

So it seems to be an inability to hide fields. I tried disabling hiding and set to allow all fields pertinent to the user profile, but the error was unchanged.

My site is completely unusable with this error.

uomeds’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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