From a3aa8a6de86362a34ea56bb7d00305fe895b8673 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 31 Jan 2017 10:44:10 +0800 Subject: [PATCH] =?UTF-8?q?find=E6=96=B9=E6=B3=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index ec0cf0cb..e3e74c38 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2407,7 +2407,7 @@ class Query } $result = Cache::get($key); } - if (!$result) { + if (false === $result) { // 生成查询SQL $sql = $this->builder->select($options); // 获取参数绑定 @@ -2438,7 +2438,7 @@ class Query // 返回PDOStatement对象 return $resultSet; } - $result = isset($resultSet[0]) ? $resultSet[0] : []; + $result = isset($resultSet[0]) ? $resultSet[0] : null; } if (isset($cache)) {