From 337c6e583cced016582e6367b9db8b44e9dd0b5e Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 21 Apr 2022 16:15:52 +1200 Subject: [PATCH] ENH Various fixes for PHP 8.1 compatibility --- src/ORM/Connect/MySQLiConnector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ORM/Connect/MySQLiConnector.php b/src/ORM/Connect/MySQLiConnector.php index da15d204698..969359bbe77 100644 --- a/src/ORM/Connect/MySQLiConnector.php +++ b/src/ORM/Connect/MySQLiConnector.php @@ -67,7 +67,8 @@ public function prepareStatement($sql, &$success) try { $success = $statement->prepare($sql); } catch (mysqli_sql_exception $e) { - throw new DatabaseException($e->getMessage()); + $success = false; + $this->databaseError($e->getMessage(), E_USER_ERROR, $sql); } return $statement; }