summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2022-01-05 16:32:10 +0100
committerAndrey Andreev <narf@devilix.net>2022-01-05 16:32:10 +0100
commit2fa66ba7c6840ac851ae7da2889e7fb654dcda07 (patch)
tree70573048d629ecc51804507c7868356fad323860 /system/database/drivers/mysqli/mysqli_driver.php
parentefc96b71e4b1d13d713d8b2be01796b7d30e6f9b (diff)
parent1d0315b6b3d7003bfb348ccaf7ee30d2533635de (diff)
Merge branch '3.1-stable' into develop
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_driver.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 428b7e7f6..dc3d0cf48 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -116,6 +116,13 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
public function db_connect($persistent = FALSE)
{
+ // PHP 8.1 changes default error handling mode from silent to exceptions - reverse that
+ if (is_php('8.1'))
+ {
+ $mysqli_driver = new mysqli_driver();
+ $mysqli_driver->report_mode = MYSQLI_REPORT_OFF;
+ }
+
// Do we have a socket path?
if ($this->hostname[0] === '/')
{