改进Response类 支持扩展不同的输出类型 改进Model类 不同的模型采用不同的查询对象实例 修正Request类一处错误 助手函数view改进 直接返回Response类对象实例

This commit is contained in:
thinkphp
2016-05-16 14:18:47 +08:00
parent 891c1f99f2
commit 199825ec32
15 changed files with 420 additions and 212 deletions

View File

@@ -335,7 +335,7 @@ class Validate
}
// 如果不是require 有数据才会行验证
if (0 === strpos($info, 'require') || !empty($value)) {
if (0 === strpos($info, 'require') || (!is_null($value) && '' !== $value)) {
// 验证类型
$callback = isset(self::$type[$type]) ? self::$type[$type] : [$this, $type];
// 验证数据