Skip to content

Commit f33611d

Browse files
authored
Merge pull request #947 from pupi1985/patch-152
Avoid throwing MySQL exceptions in PHP 8.1
2 parents 9361ee0 + fc3bc3e commit f33611d

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)