From 0167b44dd98f93f9dfe143491459e4c31131acbd Mon Sep 17 00:00:00 2001 From: Sveneld Date: Sat, 2 Mar 2024 17:25:43 +0100 Subject: [PATCH] add trigger error on query error --- src/Db/MysqliDb.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Db/MysqliDb.php b/src/Db/MysqliDb.php index 2f9a5fb..9d3c91a 100644 --- a/src/Db/MysqliDb.php +++ b/src/Db/MysqliDb.php @@ -48,6 +48,7 @@ public function connect() !empty($this->conn->connect_errno) ? $this->conn->connect_errno : 0 ); } else { + trigger_error('DB connection error!', E_USER_ERROR); die(_('DB connection error!')); } } @@ -63,6 +64,7 @@ public function query($query, $params = array()) if ($this->throwException) { throw new \RuntimeException('DB error in : ' . $query); } else { + trigger_error('DB error in : ' . $query, E_USER_ERROR); die(_('DB error') . ' ' . $this->conn->error . ' ' . _('in') . ': ' . $query); } }