From 38fc2858158a00f954b3a1b2936674415edf3f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Tue, 5 Jul 2016 16:39:33 +0200 Subject: [PATCH] BUGFIX: If query errored, return empty result In order to avoid errors if the query did not return a result object we return an empty result early on. --- Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php b/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php index e665cf2..8218696 100644 --- a/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php +++ b/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php @@ -158,6 +158,10 @@ public function addToFulltext($fulltext, $identifier) { public function query($query) { $result = $this->connection->query($query); $resultArray = array(); + if ($result === false) { + return $resultArray; + } + while ($resultRow = $result->fetchArray(SQLITE3_ASSOC)) { $resultArray[] = $resultRow; }