Handle null connection and suppress exceptions in DB close method

This commit is contained in:
Jeppe Bundgaard
2026-05-12 04:21:45 +02:00
parent 6c40810caf
commit aaae6c9536
+8 -1
View File
@@ -82,7 +82,14 @@ class db
public function close(): void
{
$this->conn->close();
if (!isset($this->conn)) {
return;
}
try {
$this->conn->close();
} catch (\Throwable) {
}
}
public function get(string $table, int $id)