Posted by aharown07 on November 27, 2008 at 11:36pm
Jump to:
| Project: | Profile Tabs |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Enabled the module and went to site configuration->Profile Tabs... this error appears.
warning: Invalid argument supplied for foreach() in /folder/folder/public_html/folder/sites/all/modules/user_badges/user_badges.module on line 178.
Guess I don't know if the problem is in Profile Tabs or User Badges.
Comments
#1
I'll check it out.
#2
I have a similar error in the Profil Tab administration:
warning: Invalid argument supplied for foreach() in C:\DOCUMENTI\SITI\dru5\includes\form.inc on line 949.
It refers to:
function form_select_options($element, $choices = NULL) {if (!isset($choices)) {
$choices = $element['#options'];
}
// array_key_exists() accommodates the rare event where $element['#value'] is NULL.
// isset() fails in this situation.
$value_valid = isset($element['#value']) || array_key_exists('#value', $element);
$value_is_array = is_array($element['#value']);
$options = '';
foreach ($choices as $key => $choice) { //THIS is line 949
if (is_array($choice)) {
$options .= '<optgroup label="'. $key .'">';
$options .= form_select_options($element, $choice);
$options .= '</optgroup>';
}
elseif (is_object($choice)) {
$options .= form_select_options($element, $choice->option);
}
else {
$key = (string)$key;
if ($value_valid && (!$value_is_array && (string)$element['#value'] === $key || ($value_is_array && in_array($key, $element['#value'])))) {
$selected = ' selected="selected"';
}
else {
$selected = '';
}
$options .= '<option value="'. check_plain($key) .'"'. $selected .'>'. check_plain($choice) .'</option>';
}
}
return $options;
}
Any idea?
Thanks in advance
Alessandro Bronzo