#12142 Caught bd exception in php version 8.0 and 8.2

This commit is contained in:
Jorge Rincon 2023-09-29 09:21:08 +02:00
parent 477d3e62f8
commit 418624000f
1 changed files with 7 additions and 2 deletions

View File

@ -80,8 +80,13 @@ function mysql_connect_db(
// If you want persistent connections change it to mysql_pconnect().
if ($config['mysqli']) {
if (empty($ssl)) {
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
if (mysqli_connect_errno() > 0) {
try {
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php';
return false;
}
} catch (\mysqli_sql_exception $e) {
include 'general/mysqlerr.php';
return false;
}