From 629a1942112236df0a8e982e4ef16d23b27d85d1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 14 May 2017 12:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E6=A8=A1=E5=9E=8B=E7=B1=BB?= =?UTF-8?q?=E7=9A=84destroy=E6=96=B9=E6=B3=95=20=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E7=A9=BA=E6=95=B0=E7=BB=84=E5=92=8Cnull=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=B8=8D=E8=BF=9B=E8=A1=8C=E4=BB=BB=E4=BD=95=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=93=8D=E4=BD=9C?= 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 28d37cfe..79216ef5 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1515,7 +1515,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } elseif ($data instanceof \Closure) { call_user_func_array($data, [ & $query]); $data = null; - } elseif (is_null($data)) { + } elseif (empty($data) && 0 !== $data) { return 0; } $resultSet = $query->select($data);