Merge pull request #27632 from mdeweerd/fix/depr/mysqli_init

Fix: Deprecated mysqli::init() in PHP8.1
This commit is contained in:
Laurent Destailleur 2024-01-18 22:55:24 +01:00 committed by GitHub
commit f3d97a8a13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1270,7 +1270,11 @@ class mysqliDoli extends mysqli
public function __construct($host, $user, $pass, $name, $port = 0, $socket = "")
{
$flags = 0;
parent::init();
if (PHP_VERSION_ID >= 80100) {
parent::__construct();
} else {
parent::init();
}
if (strpos($host, 'ssl://') === 0) {
$host = substr($host, 6);
parent::options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, false);