Fix broken database

This commit is contained in:
Lewis Dale committed 2023-08-27 21:41:49 +01:00
1 parent 9164929969
commit 3949e611ea
2 files changed
+4 -4

No files matched your search

+2 -3
View File
@@ -24,9 +24,6 @@ class SqliteImageDb implements ImageDb {
quality INTEGER NULLABLE,
content TEXT NOT NULL
)');
$crs = $this->db->query('SELECT * FROM images');
$this->logger->info('Found something', ['results '=> $crs->fetchAll()]);
}
public function findImage(string $path, ResizeParams $params): Image | null {
@@ -38,6 +35,8 @@ class SqliteImageDb implements ImageDb {
':quality' => $params->quality
]);
$this->logger->info("Querying images", ['query' => $stmt->queryString]);
$result = $stmt->fetchObject();
return $result ? Image::fromString(base64_decode($result->content)) : null;