From 0f95dd45a94d00723f3ecd6483f3a6366cc7dbe9 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 27 Mar 2009 00:16:16 +0000 Subject: #376408 by pwolanin and ajevans85: Stop phantom () appearing in search results. --- modules/search/search.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/search/search.module b/modules/search/search.module index 21a3657df..bc3ef5648 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -646,7 +646,9 @@ function search_node_update_index($node) { while ($link = db_fetch_object($result)) { $output[] = $link->caption; } - return '(' . implode(', ', $output) . ')'; + if (count($output)) { + return '(' . implode(', ', $output) . ')'; + } } /** -- cgit v1.2.3