From 84f7346d494ff47ffc32acc6a26d3d4864a1bb7f Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 6 Apr 2023 23:08:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActiveQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActiveQuery.php b/ActiveQuery.php index 037e0d6..5153a08 100644 --- a/ActiveQuery.php +++ b/ActiveQuery.php @@ -166,7 +166,7 @@ class ActiveQuery extends Component implements ISqlBuilder public function first(): ModelInterface|null { $data = $this->execute($this->builder->one())->one(); - if (!is_array($data)) { + if (is_array($data)) { return $this->populate($data); } else { return NULL;