Posted by kleinmp on October 29, 2009 at 5:44pm
Jump to:
| Project: | Location |
| Version: | 6.x-3.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
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.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.