From ede2dc7cfe4a44d6fa651778269e490e54f993b6 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 14 Feb 2023 01:14:49 +0000 Subject: [PATCH] raw_db should always return something --- core/database.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/database.php b/core/database.php index bedeb941..f83e1419 100644 --- a/core/database.php +++ b/core/database.php @@ -336,6 +336,9 @@ class Database public function raw_db(): PDO { + if (is_null($this->db)) { + $this->connect_db(); + } return $this->db; }