mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: Undefined property: CodeIgniter\Database\OCI8\PreparedQuery::$statement
This commit is contained in:
parent
63d50b405d
commit
344bc6f925
@ -266,7 +266,12 @@ parameters:
|
||||
path: system/Database/MySQLi/Result.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between array<string, int|string|null> and false will always evaluate to false\\.$#"
|
||||
message: "#^Property CodeIgniter\\\\Database\\\\BasePreparedQuery\\:\\:\\$statement \\(object\\|resource\\) in isset\\(\\) is not nullable\\.$#"
|
||||
count: 2
|
||||
path: system/Database/OCI8/PreparedQuery.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between array and false will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: system/Database/Postgre/Connection.php
|
||||
|
||||
|
@ -68,7 +68,7 @@ class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
|
||||
*/
|
||||
public function _execute(array $data): bool
|
||||
{
|
||||
if (null === $this->statement) {
|
||||
if (! isset($this->statement)) {
|
||||
throw new BadMethodCallException('You must call prepare before trying to execute a prepared statement.');
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
|
||||
public function _close(): bool
|
||||
{
|
||||
$error = true;
|
||||
if (null !== $this->statement) {
|
||||
$error = oci_free_statement($this->statement);
|
||||
if (isset($this->statement)) {
|
||||
$error = (bool) oci_free_statement($this->statement);
|
||||
unset($this->statement);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user