Closed (duplicate)
Project:
Location
Version:
6.x-3.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2008 at 02:18 UTC
Updated:
15 Apr 2009 at 07:09 UTC
this error occurs when a user clicks "Preview" button when creating a node which does not have "Location" enabled.
this function is still called when $variables['locations'] is an empty string or null.
function template_preprocess_locations(&$variables) {
$locs = $variables['locations'];
$variables['locations'] = array();
$variables['rawlocs'] = $locs;
foreach ($locs as $location) {
$variables['locations'][] = theme('location', $location, $variables['hide']);
}
}
could anyone take a look? thanks
Comments
Comment #1
jriedel commentedI just saw the same thing. Yes it seems to happen when doing a preview of a node type that has no location information.
Comment #2
yesct commentedmarking as a duplicate of #319091: warning: Invalid argument supplied for foreach()
I think there were a bunch of foreach errors, but they have been fixed with the recent commits. Try a newer version like the 3.1-rc1 or the dev versions.