diff --git a/core/DbConnectionWrapper.php b/core/DbConnectionWrapper.php index f432bb262..5de337513 100644 --- a/core/DbConnectionWrapper.php +++ b/core/DbConnectionWrapper.php @@ -60,6 +60,7 @@ class DbConnectionWrapper * * @param \mysqli|null $oMysqli * @since 3.0.4 3.1.1 3.2.0 Param $oMysqli becomes nullable + * @since 3.1.0-4 N°6848 backport of restoring cnx on null parameter value */ public static function SetDbConnectionMockForQuery(?mysqli $oMysqli = null): void { diff --git a/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php b/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php index 44482827d..1afbe1260 100644 --- a/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php +++ b/tests/php-unit-tests/unitary-tests/core/CMDBSource/TransactionsTest.php @@ -280,7 +280,7 @@ class TransactionsTest extends ItopTestCase protected function tearDown(): void { try { - DbConnectionWrapper::SetDbConnectionMockForQuery(); + DbConnectionWrapper::SetDbConnectionMockForQuery(); // Else will throw error on PHP 8.1+ (see N°6848) parent::tearDown(); } catch (MySQLTransactionNotClosedException $e) {