mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #27632 from mdeweerd/fix/depr/mysqli_init
Fix: Deprecated mysqli::init() in PHP8.1
This commit is contained in:
commit
f3d97a8a13
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user