From e36d63d14459857fc1c7fc997fced3540b286dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 30 Oct 2020 01:38:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index cecf71f9..dfa23705 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -39,7 +39,7 @@ class Command extends Component /** @var string */ private string $_modelName; - private ?PDOStatement $prepare; + private ?PDOStatement $prepare = null; /** @@ -196,7 +196,7 @@ class Command extends Component } else { $result = $this->search($type); } - if ($this->prepare instanceof PDOStatement) { + if ($this->prepare) { $this->prepare->closeCursor(); } if (Config::get('debug.enable', false, false)) {