From 0d185b77f3e5e665d31fa04380803f7a5bbcea53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 10 Aug 2021 10:31:56 +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/Traits/QueryTrait.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Database/Traits/QueryTrait.php b/Database/Traits/QueryTrait.php index cba97559..d569b135 100644 --- a/Database/Traits/QueryTrait.php +++ b/Database/Traits/QueryTrait.php @@ -476,10 +476,7 @@ trait QueryTrait if ($conditionArray instanceof Closure) { $conditionArray = $this->makeClosureFunction($conditionArray); } - - $oldWhere = '(' . implode(') AND (', $this->where) . ')'; - - $this->where = ['(' . $oldWhere . ') OR ' . $conditionArray]; + $this->where = ['(' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . ')']; return $this; }