From a5afa55ce61c394796b8d792b707a05513ca946e Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 3 May 2018 17:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8exp=E8=A1=A8=E8=BE=BE?= =?UTF-8?q?=E5=BC=8F=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/zh-cn.php | 1 + library/think/db/Builder.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lang/zh-cn.php b/lang/zh-cn.php index c821f9fe..eb7a9142 100644 --- a/lang/zh-cn.php +++ b/lang/zh-cn.php @@ -48,6 +48,7 @@ return [ 'KVDB init error' => '没有初始化KVDB,请在SAE管理平台初始化KVDB服务', 'fields not exists' => '数据表字段不存在', 'where express error' => '查询表达式错误', + 'not support data' => '不支持的数据表达式', 'no data to update' => '没有任何数据需要更新', 'miss data to insert' => '缺少需要写入的数据', 'miss complex primary data' => '缺少复合主键数据', diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index d4d27a1e..fa66e06e 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -120,6 +120,8 @@ abstract class Builder case 'dec': $result[$item] = $item . '-' . floatval($val[1]); break; + default: + throw new Exception('not support data :[' . $val[0] . ']'); } } elseif (is_scalar($val)) { // 过滤非标量数据