summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-06-15 18:41:25 +0000
committerDries Buytaert <dries@buytaert.net>2004-06-15 18:41:25 +0000
commit5ba08f61c21adff0faf7518a879c6c60a674d58f (patch)
tree27feacf06fbbd8d3e53904eb4248d200d3daa8fa /modules/taxonomy/taxonomy.module
parentd80d2d6e2df3230cceeb377169daac93e3e5b494 (diff)
downloadbrdo-5ba08f61c21adff0faf7518a879c6c60a674d58f.tar.gz
brdo-5ba08f61c21adff0faf7518a879c6c60a674d58f.tar.bz2
- Patch #8418 by Axel: don't insert tid=0's in the database
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index cb425eb53..1ece8c28a 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -392,7 +392,9 @@ function taxonomy_node_save($nid, $terms) {
if ($terms) {
foreach ($terms as $term) {
- db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term);
+ if ($term) {
+ db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term);
+ }
}
}
}