summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-28 01:09:58 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-28 01:09:58 +0000
commit585aa50e6a2d7d8f67f8116c207a342c47728dfb (patch)
treeea090bf3b003a314237e5cef4d94124bcaa42a46 /modules/taxonomy/taxonomy.module
parentf5a4f24b5e02c82f67d90116356f83a542f5b99f (diff)
downloadbrdo-585aa50e6a2d7d8f67f8116c207a342c47728dfb.tar.gz
brdo-585aa50e6a2d7d8f67f8116c207a342c47728dfb.tar.bz2
#346156 by stBorchert, swentel, and catch: Fix deletion of terms (with tests).
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module4
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);