From 9092eb55355a6b89845095ec5585dd0c7aac5c66 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 30 Dec 2011 23:09:17 -0800 Subject: [PATCH] throw exception on sphinx search error --- plugins/SphinxSearch/sphinxsearch.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/SphinxSearch/sphinxsearch.php b/plugins/SphinxSearch/sphinxsearch.php index 46b5e3e28a..607ac76d27 100644 --- a/plugins/SphinxSearch/sphinxsearch.php +++ b/plugins/SphinxSearch/sphinxsearch.php @@ -65,6 +65,9 @@ class SphinxSearch extends SearchEngine function query($q) { $result = $this->sphinx->query($q, $this->remote_table()); + if ($result === false) { + throw new ServerException($this->sphinx->getLastError()); + } if (!isset($result['matches'])) return false; $id_set = join(', ', array_keys($result['matches'])); $this->target->whereAdd("id in ($id_set)"); -- 2.39.5