修正 模板引擎驱动类的config方法

This commit is contained in:
thinkphp
2016-09-18 11:39:37 +08:00
parent 2aa3adb2a8
commit f75d1c5d80
2 changed files with 7 additions and 1 deletions

View File

@@ -141,7 +141,11 @@ class Php
*/
public function config($name, $value = null)
{
if (is_array($name)) {
$this->config = array_merge($this->config, $name);
} else {
$this->config[$name] = $value;
}
}
}

View File

@@ -140,8 +140,10 @@ class Think
{
if (is_array($name)) {
$this->template->config($name);
$this->config = array_merge($this->config, $name);
} else {
$this->template->$name = $value;
$this->config[$name] = $value;
}
}