N°4517 - PHP 8.1: Fix deprecated usages of MySQLi

* init() method should not be called in OOP
  * real_connect() "flags" param should not be null to match its type (int)
This commit is contained in:
Molkobain
2022-05-18 18:00:35 +02:00
committed by acognet
parent ff12dd99b5
commit 04dbaef257

View File

@@ -157,7 +157,7 @@ class CMDBSource
$iPort = null;
self::InitServerAndPort($sDbHost, $sServer, $iPort);
$iFlags = null;
$iFlags = 0;
// *some* errors (like connection errors) will throw mysqli_sql_exception instead of generating warnings printed to the output
// but some other errors will still cause the query() method to return false !!!
@@ -166,7 +166,6 @@ class CMDBSource
try
{
$oMysqli = new mysqli();
$oMysqli->init();
if ($bTlsEnabled)
{