in _taxonomx_access_entity_fields() (line 726 of /taxonomy_access/taxonomy_access.create.inc)
I get this warning after saving a user-profile with a taxonomyfield. This happend after I changed the global default settings to avoid http://drupal.org/node/1368934.
A small change of line 726 in taxonomy_access.create.inc solves the problem, so that there is no further warning. No idea if this could cause any trouble.
I changed:
foreach ($field as $langcode => $values) {
// Add non-empty fields to the lists.
if (!empty($values)) {
$fields['langcodes'][$langcode] = $langcode;
$fields['field_list'][$field_name] = $field_name;
$fields['data'][$field_name][$langcode] = $values;
}
unset($values);
}
to:
//check if $field is an array to avoid warning if empty
if (is_array($field)){
foreach ($field as $langcode => $values) {
// Add non-empty fields to the lists.
if (!empty($values)) {
$fields['langcodes'][$langcode] = $langcode;
$fields['field_list'][$field_name] = $field_name;
$fields['data'][$field_name][$langcode] = $values;
}
unset($values);
}
}