From 8ed7c91b2995528275747b35d0740aa40fcce5a8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 2 Feb 2016 19:04:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=A9=B1=E5=8A=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/log/driver/File.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/think/log/driver/File.php b/library/think/log/driver/File.php index 7826f1b5..654c3282 100644 --- a/library/think/log/driver/File.php +++ b/library/think/log/driver/File.php @@ -22,9 +22,11 @@ class File ]; // 实例化并传入参数 - public function __construct(array $config = []) + public function __construct($config = []) { - $this->config = array_merge($this->config, $config); + if (is_array($config)) { + $this->config = array_merge($this->config, $config); + } } /**