summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Coevoet <stof@notk.org>2012-01-09 20:33:51 +0100
committerChristophe Coevoet <stof@notk.org>2012-01-09 20:33:51 +0100
commit0ef96d41cdaffbe91ee525ad057549781fbaaa39 (patch)
treeeb4a6b545c6993f2518b20acbb8a219ce9a790ec
parentf3103777a2e10a40f8b1ec98164959afc32315cc (diff)
Fixed another bugHEADmaster
-rw-r--r--src/Riu/Search/Engine/BooleanEngine.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Riu/Search/Engine/BooleanEngine.php b/src/Riu/Search/Engine/BooleanEngine.php
index 5d38d56..b75f6fd 100644
--- a/src/Riu/Search/Engine/BooleanEngine.php
+++ b/src/Riu/Search/Engine/BooleanEngine.php
@@ -33,6 +33,10 @@ class BooleanEngine implements EngineInterface
}
$orClauses = array_filter(explode(' ', $query));
$results = array_map(array($this, 'handleAndQuery'), $orClauses);
+ if (empty($results)) {
+ return array();
+ }
+
$result = call_user_func_array('array_merge', $results);
return array_unique($result);