model类的setField方法忽略数据副本

This commit is contained in:
thinkphp
2016-02-21 11:37:28 +08:00
parent b7632a5a52
commit e16cb705ba
2 changed files with 5 additions and 5 deletions

View File

@@ -145,13 +145,13 @@ class View
*
* @param string $template 模板文件名或者内容
* @param array $vars 模板输出变量
* @param array $cache 模板缓存参数
* @param array $config 模板参数
* @param bool $renderContent 是否渲染内容
*
* @return string
* @throws Exception
*/
public function fetch($template = '', $vars = [], $cache = [], $renderContent = false)
public function fetch($template = '', $vars = [], $config = [], $renderContent = false)
{
// 模板变量
$vars = $vars ? $vars : $this->data;
@@ -175,7 +175,7 @@ class View
is_file($template) ? include $template : eval('?>' . $template);
} else {
// 指定模板引擎
$this->engine->fetch($template, $vars, $cache);
$this->engine->fetch($template, $vars, $config);
}
// 获取并清空缓存
$content = ob_get_clean();