summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2004-06-15 18:45:25 (GMT)
committerDries Buytaert2004-06-15 18:45:25 (GMT)
commit3d2988c824b366e7b428384862c4bf01c781320f (patch)
treed98dbbb8115b5c382498e516b37fcfa0eb24c6db
parent5081f9d059ed43d4d3032bd395e6e7a86996bf5a (diff)
- Patch #8418 by Axel: don't insert tid=0's in the database
-rw-r--r--modules/taxonomy.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index ca6d831..7f61782 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -395,7 +395,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);
+ }
}
}
}