location_map_link_us

warning: Invalid argument supplied for foreach() in /path/to/drupal/sites/all/modules/location/location.inc on line 54.

The code looks like this:

$selected_providers = variable_get('location_map_link_'. $location['country'], function_exists($default_func) ? $default_func() : array());

$links = array();
foreach ($selected_providers as $mapper) {

On my site, it's looking for the variable location_map_link_us, but that variable contains a string instead of an array, so I'm getting the above error.

Comments

kleinmp’s picture

Status: Active » Fixed

Scratch this. Somehow the variable 'location_map_link_us' was stored as a string instead of an array. I'm not sure how that happened, but everything is fixed now.

Status: Fixed » Closed (fixed)

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