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; }