From c7f532d2078cc8e483d3c76da09185a95b2064ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=88=E6=95=AC?= Date: Wed, 27 Mar 2024 22:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20issue=20#468=20db=E9=93=BE?= =?UTF-8?q?=E5=BC=8F=E6=96=B9=E6=B3=95cache=E6=9F=A5=E8=AF=A2=E6=97=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=92=8C=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/PDOConnection.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/db/PDOConnection.php b/src/db/PDOConnection.php index cfdcce72..7021ae28 100644 --- a/src/db/PDOConnection.php +++ b/src/db/PDOConnection.php @@ -724,9 +724,10 @@ protected function pdoQuery(BaseQuery $query, $sql, bool $master = null): array $key = $cacheItem->getKey(); $data = $this->cache->get($key); - - if (null !== $data) { + if (gettype($data) !== 'boolean' && null !== $data) { return $data; + } else { + return []; } } }