Commit 64e6ec7d authored by Daniel Linn's avatar Daniel Linn
Browse files

fixing #934726 Undefined index: taxonomy_term in taxonomy_field_formatter_view()

parent 1c3cace3
......@@ -144,12 +144,14 @@ function taxonomy_formatter_field_formatter_view($entity_type, $entity, $field,
$termid = $item['tid'];
$term[] = $termid;
$actterm = entity_load('taxonomy_term', $term);
$uri = entity_uri('taxonomy_term', $actterm[$termid]);
if ($settings['links_option']) {
$formatted .= $elementwrap[0] . l($actterm[$termid]->name, $uri['path'], $uri['options']) . $elementwrap[1] . $separator;
}
else {
$formatted .= $elementwrap[0] . check_plain($actterm[$termid]->name) . $elementwrap[1] . $separator;
if(isset($actterm[$termid])) {
$uri = entity_uri('taxonomy_term', $actterm[$termid]);
if ($settings['links_option']) {
$formatted .= $elementwrap[0] . l($actterm[$termid]->name, $uri['path'], $uri['options']) . $elementwrap[1] . $separator;
}
else {
$formatted .= $elementwrap[0] . check_plain($actterm[$termid]->name) . $elementwrap[1] . $separator;
}
}
}
$length = strlen($separator);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment