From c1e23ae9e2f4dd439bbf6254c4ac48e6c9e4788c Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Thu, 20 Aug 2009 15:20:15 +0200 Subject: [PATCH] Fixed to prevent the search on no available keywords. --- src/IDF/Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IDF/Search.php b/src/IDF/Search.php index bc56c70..de91795 100644 --- a/src/IDF/Search.php +++ b/src/IDF/Search.php @@ -59,7 +59,7 @@ class IDF_Search extends Pluf_Search $words_flat[] = $word; } $word_ids = self::getWordIds($words_flat); - if (in_array(null, $word_ids)) { + if (in_array(null, $word_ids) or count($word_ids) == 0) { return array(); } return self::mySearchDocuments($word_ids, $project, $model);