Skip to content

Commit fc3bc3e

Browse files
committed
Avoid throwing MySQL exceptions in PHP 8.1
1 parent 2cf739b commit fc3bc3e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

qa-include/qa-db.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ function qa_db_connect($failhandler = null)
7777
if (QA_PERSISTENT_CONN_DB)
7878
$host = 'p:' . $host;
7979

80+
// Avoid throwing exceptions (needed as of PHP 8.1)
81+
mysqli_report(MYSQLI_REPORT_OFF);
82+
8083
// in mysqli we connect and select database in constructor
8184
if ($port !== null)
8285
$db = new mysqli($host, QA_FINAL_MYSQL_USERNAME, QA_FINAL_MYSQL_PASSWORD, QA_FINAL_MYSQL_DATABASE, $port);

0 commit comments

Comments
 (0)