From f75d1c5d80c1af5313d604e68cd948fdfac0e205 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 18 Sep 2016 11:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=BC=95=E6=93=8E=E9=A9=B1=E5=8A=A8=E7=B1=BB=E7=9A=84config?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/view/driver/Php.php | 6 +++++- library/think/view/driver/Think.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/library/think/view/driver/Php.php b/library/think/view/driver/Php.php index 04af6df3..06f49a6a 100644 --- a/library/think/view/driver/Php.php +++ b/library/think/view/driver/Php.php @@ -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; + } } } diff --git a/library/think/view/driver/Think.php b/library/think/view/driver/Think.php index f100def1..e82f5139 100644 --- a/library/think/view/driver/Think.php +++ b/library/think/view/driver/Think.php @@ -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; } }