diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index cb425eb53..1ece8c28a 100644 --- a/modules/taxonomy.module +++ b/modules/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); + } } } } 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); + } } } } |