From 04dbaef25718da14ca830890bbc96dcc938c2383 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 18 May 2022 18:00:35 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04517=20-=20PHP=208.1:=20Fix=20deprecated?= =?UTF-8?q?=20usages=20of=20MySQLi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * init() method should not be called in OOP * real_connect() "flags" param should not be null to match its type (int) --- core/cmdbsource.class.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/cmdbsource.class.inc.php b/core/cmdbsource.class.inc.php index aae7e65fd..c725d0cec 100644 --- a/core/cmdbsource.class.inc.php +++ b/core/cmdbsource.class.inc.php @@ -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) {