From 6e9dc16d359efb754e69c69f9394d12633819e53 Mon Sep 17 00:00:00 2001 From: liuzhaowei55 Date: Wed, 16 Dec 2015 11:01:37 +0800 Subject: [PATCH] update thinkphp/base.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改I函数$default默认值为null ,避免在isset()函数检测不到输入值时将输入值默认为空字符串的问题, 默认值为空字符串的话,逻辑代码需要手动判断输入值是空字符串还是没有传此值. --- base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.php b/base.php index db7295ce..318c46da 100644 --- a/base.php +++ b/base.php @@ -69,7 +69,7 @@ function C($name = '', $value = null, $range = '') } // 获取输入数据 支持默认值和过滤 -function I($key, $default = '', $filter = '') +function I($key, $default = null, $filter = '') { if (strpos($key, '.')) { // 指定参数来源