Commit 1f5ea296 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#172977 follow up patch by pwolanin: fix NOTICE in taxonomy_term_count_nodes

parent 12f771d5
......@@ -788,7 +788,7 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
foreach (_taxonomy_term_children($tid) as $c) {
$children_count += taxonomy_term_count_nodes($c, $type);
}
return $count[$type][$tid] + $children_count;
return $children_count + (isset($count[$type][$tid]) ? $count[$type][$tid] : 0);
}
/**
......
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