summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/changelog.md4
-rw-r--r--drivers/adodb-mysqli.inc.php13
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/changelog.md b/docs/changelog.md
index 487ffe7f..2f5e9ee4 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -51,8 +51,10 @@ Older changelogs:
### Fixed
+- mysqli: force error reporting mode to OFF (PHP 8.1 compatibility)
+ [#755](https://github.com/ADOdb/ADOdb/issues/755)
- pdo: fix metaIndexes declaration to match parent
- [#717](https://github.com/ADOdb/ADOdb/issues/749)
+ [#717](https://github.com/ADOdb/ADOdb/issues/717)
## [5.21.2] - 2021-08-22
diff --git a/drivers/adodb-mysqli.inc.php b/drivers/adodb-mysqli.inc.php
index 16de1e56..4364c9e2 100644
--- a/drivers/adodb-mysqli.inc.php
+++ b/drivers/adodb-mysqli.inc.php
@@ -90,6 +90,19 @@ class ADODB_mysqli extends ADOConnection {
private $isSelectStatement = false;
/**
+ * ADODB_mysqli constructor.
+ */
+ public function __construct()
+ {
+ parent::__construct();
+
+ // Forcing error reporting mode to OFF, which is no longer the default
+ // starting with PHP 8.1 (see #755)
+ mysqli_report(MYSQLI_REPORT_OFF);
+ }
+
+
+ /**
* Sets the isolation level of a transaction.
*
* @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:settransactionmode