改进Model类的getData和getAttr方法 不存在的属性抛出异常

修正Route类闭包的路由参数获取
This commit is contained in:
thinkphp
2016-07-06 15:12:55 +08:00
parent 3745531d6f
commit a05cb7a1ab
3 changed files with 27 additions and 16 deletions

View File

@@ -1004,6 +1004,8 @@ class Route
}
}
if ($route instanceof \Closure) {
// 解析路由参数
Request::instance()->param(array_merge($match, $_GET));
// 执行闭包
return ['type' => 'function', 'function' => $route, 'params' => $match];
}