diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 4e25c3bd8..b28e0a306 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -765,8 +765,8 @@ function taxonomy_get_parents($tid, $key = 'tid') { */ function taxonomy_get_parents_all($tid) { $parents = array(); - if ($tid) { - $parents[] = taxonomy_term_load($tid); + if ($term = taxonomy_term_load($tid)) { + $parents[] = $term; $n = 0; while ($parent = taxonomy_get_parents($parents[$n]->tid)) { $parents = array_merge($parents, $parent); |