Commit da74c2a2 authored by git's avatar git Committed by Chris Johnson

Issue #2099717 by Peacog, derekw: Trying to get property of non-object in...

Issue #2099717 by Peacog, derekw: Trying to get property of non-object in context_entity_prepare_view()
parent 63ef4d93
......@@ -106,7 +106,7 @@ function context_entity_prepare_view($prepare, $entity_type) {
if ($entity_type === 'taxonomy_term' && count($prepare) === 1) {
$term = reset($prepare);
$menu = menu_get_object('taxonomy_term', 2);
if ($term->tid == $menu->tid && $plugin = context_get_plugin('condition', 'taxonomy_term')) {
if ($menu && $term->tid == $menu->tid && $plugin = context_get_plugin('condition', 'taxonomy_term')) {
$plugin->execute($term, 'view');
}
}
......
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