From aaae6c95364c68c33647fbfe58c63b1c0e909a08 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Tue, 12 May 2026 04:21:45 +0200 Subject: [PATCH] Handle null connection and suppress exceptions in DB `close` method --- services/nginx/app/classes/db.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/services/nginx/app/classes/db.php b/services/nginx/app/classes/db.php index c8a0c623..0a313420 100644 --- a/services/nginx/app/classes/db.php +++ b/services/nginx/app/classes/db.php @@ -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)