diff --git a/taxonomy_title.module b/taxonomy_title.module index 10a5669..359a784 100644 --- a/taxonomy_title.module +++ b/taxonomy_title.module @@ -265,11 +265,13 @@ function taxonomy_title_token_list($type = 'all') { function taxonomy_title_token_values($type, $object = NULL, $options = array()) { $values = array(); if ($type == 'taxonomy') { + if (!empty($object)) { $category = $object; // Use taxonomy title if it exists, else the category name. $title = _taxonomy_title_get($category->tid); $values['term-title'] = ($title) ? check_plain($title) : check_plain($category->name); $values['term-title-raw'] = ($title) ? $title : $category->name; + } } return $values; }