Skip to content

Commit 38fc285

Browse files
authored
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.
1 parent 3c86a3c commit 38fc285

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ public function addToFulltext($fulltext, $identifier) {
158158
public function query($query) {
159159
$result = $this->connection->query($query);
160160
$resultArray = array();
161+
if ($result === false) {
162+
return $resultArray;
163+
}
164+
161165
while ($resultRow = $result->fetchArray(SQLITE3_ASSOC)) {
162166
$resultArray[] = $resultRow;
163167
}

0 commit comments

Comments
 (0)