diff --git a/lib/Query/DataQuery.php b/lib/Query/DataQuery.php index 2f11c55..81e01c6 100644 --- a/lib/Query/DataQuery.php +++ b/lib/Query/DataQuery.php @@ -109,7 +109,15 @@ class DataQuery } $query = $this->queryProvider[$queryName]; - $result = $this->connection->prepare($query, $limit, $offset); + try { + $result = $this->connection->prepare($query, $limit, $offset); + } catch (DBALException $exception) { + $this->logger->error( + "Could not prepare the query: " . $exception->getMessage(), + ["app" => $this->appName] + ); + return false; + } foreach ($params as $param => $value) { $result->bindValue(":" . $param, $value);