Fixed error on double close for mysqli library.
This commit is contained in:
parent
1cd1695429
commit
f3535117ce
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// MariaDBConnection.php
|
||||
// Created: 2021-04-30
|
||||
// Updated: 2023-01-07
|
||||
// Updated: 2023-07-10
|
||||
|
||||
namespace Index\Data\MariaDB;
|
||||
|
||||
|
@ -401,7 +401,9 @@ class MariaDBConnection implements IDbConnection, IDbTransactions {
|
|||
* Closes the connection and associated resources.
|
||||
*/
|
||||
public function close(): void {
|
||||
$this->connection->close();
|
||||
try {
|
||||
$this->connection->close();
|
||||
} catch(\Error $ex) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// MariaDBResultLib.php
|
||||
// Created: 2021-05-02
|
||||
// Updated: 2021-05-04
|
||||
// Updated: 2023-07-10
|
||||
|
||||
namespace Index\Data\MariaDB;
|
||||
|
||||
|
@ -48,6 +48,8 @@ class MariaDBResultLib extends MariaDBResult {
|
|||
}
|
||||
|
||||
public function close(): void {
|
||||
$this->result->free_result();
|
||||
try {
|
||||
$this->result->free_result();
|
||||
} catch(\Error $ex) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// MariaDBResultNative.php
|
||||
// Created: 2021-05-02
|
||||
// Updated: 2021-05-04
|
||||
// Updated: 2023-07-10
|
||||
|
||||
namespace Index\Data\MariaDB;
|
||||
|
||||
|
@ -35,6 +35,8 @@ class MariaDBResultNative extends MariaDBResult {
|
|||
}
|
||||
|
||||
public function close(): void {
|
||||
$this->result->close();
|
||||
try {
|
||||
$this->result->close();
|
||||
} catch(\Error $ex) {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue