mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user