From e8df221a8d49286f383a6cdb5dab64e6c361e25f Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Wed, 15 Feb 2017 12:22:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20WHERE=20IN=20/=20NOT?= =?UTF-8?q?=20IN=20=E5=9E=8B=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=AF=BC=E8=87=B4=E7=9A=84=20sql=20=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= 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 56665527..5097016d 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -379,7 +379,7 @@ abstract class Builder } else { $zone = implode(',', $this->parseValue($value, $field)); } - $whereStr .= $key . ' ' . $exp . ' (' . $zone . ')'; + $whereStr .= $key . ' ' . $exp . ' (' . (empty($zone) ? "''" : $zone) . ')'; } } elseif (in_array($exp, ['NOT BETWEEN', 'BETWEEN'])) { // BETWEEN 查询 From 56008a2c36099a03342a46b138a15af5ce0908d3 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 16 Feb 2017 17:55:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Route=E7=B1=BBparseUrlPat?= =?UTF-8?q?h=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/library/think/Route.php b/library/think/Route.php index cf640a4a..1d599a2d 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1281,9 +1281,6 @@ class Route } elseif (strpos($url, '/')) { // [模块/控制器/操作] $path = explode('/', $url); - } elseif (false !== strpos($url, '=')) { - // 参数1=值1&参数2=值2... - parse_str($url, $var); } else { $path = [$url]; } From 09629cda785f05329d9a4c3f55492b7711d1d9e9 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 17 Feb 2017 13:33:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=BAarray=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index ebeffbb4..b38778ab 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -508,7 +508,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $value = json_decode($value, true); break; case 'array': - $value = is_null($value) ? [] : json_decode($value, true); + $value = empty($value) ? [] : json_decode($value, true); break; case 'object': $value = empty($value) ? new \stdClass() : json_decode($value);