.
Deploy / deploy (push) Successful in 11s

This commit is contained in:
2026-05-06 12:58:03 +02:00
parent f2d33a6974
commit a9df8baf97
+6 -4
View File
@@ -171,6 +171,11 @@ class Repository
public function searchLogEntries(string $query, int $limit = 200, int $offset = 0): array public function searchLogEntries(string $query, int $limit = 200, int $offset = 0): array
{ {
$query = trim($query);
if ($query === '') {
return [];
}
try { try {
$stmt = $this->db->pdo()->prepare( $stmt = $this->db->pdo()->prepare(
"SELECT e.* FROM log_entries e "SELECT e.* FROM log_entries e
@@ -182,10 +187,7 @@ class Repository
$stmt->execute([$query, $limit, $offset]); $stmt->execute([$query, $limit, $offset]);
return $stmt->fetchAll(); return $stmt->fetchAll();
} catch (\PDOException $e) { } catch (\PDOException $e) {
if (str_contains($e->getMessage(), 'fts5: syntax error')) { return $this->searchLogEntriesLike($query, $limit, $offset);
return $this->searchLogEntriesLike($query, $limit, $offset);
}
throw $e;
} }
} }