From 5ba08f61c21adff0faf7518a879c6c60a674d58f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 15 Jun 2004 18:41:25 +0000 Subject: - Patch #8418 by Axel: don't insert tid=0's in the database --- modules/taxonomy/taxonomy.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/taxonomy') 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); + } } } } -- cgit v1.2.3