Commit 3d2988c8 authored by Dries's avatar Dries

- Patch #8418 by Axel: don't insert tid=0's in the database

parent 5081f9d0
......@@ -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);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment