改进模板变量赋值

This commit is contained in:
thinkphp
2016-03-15 23:10:59 +08:00
parent a496cf3198
commit 3918ca3952
2 changed files with 3 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ class View
public function fetch($template = '', $vars = [], $config = [], $renderContent = false)
{
// 模板变量
$vars = $vars ? $vars : $this->data;
$vars = array_merge($this->data, $vars);
if (!$renderContent) {
// 获取模板文件名
$template = $this->parseTemplate($template);