From 1bb78d11b722ddc9f51c3b1f738fa94806b9c0c1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 27 May 2017 22:41:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bin=E6=9F=A5=E8=AF=A2=E7=9A=84?= =?UTF-8?q?=E5=8E=BB=E9=87=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index ecec0b0e..23f88836 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -376,7 +376,7 @@ abstract class Builder if ($value instanceof \Closure) { $whereStr .= $key . ' ' . $exp . ' ' . $this->parseClosure($value); } else { - $value = is_array($value) ? $value : explode(',', $value); + $value = array_unique(is_array($value) ? $value : explode(',', $value)); if (array_key_exists($field, $binds)) { $bind = []; $array = [];