From 1f5ea29689aaa2d0833752fdbce333016475cd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Tue, 25 Sep 2007 14:44:50 +0000 Subject: #172977 follow up patch by pwolanin: fix NOTICE in taxonomy_term_count_nodes --- modules/taxonomy/taxonomy.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 45f8f58a3..3fc560c22 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -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); } /** -- cgit v1.2.3