DateQuery: use try-catch around statement prepare.
Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
This commit is contained in:
@@ -109,7 +109,15 @@ class DataQuery
|
||||
}
|
||||
|
||||
$query = $this->queryProvider[$queryName];
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user