From 9896df3b59f8b284171b24021dba1d868c3733c7 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 6 Dec 2017 16:54:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Cache.php b/library/think/Cache.php index 00be217f..1e31a96b 100644 --- a/library/think/Cache.php +++ b/library/think/Cache.php @@ -81,8 +81,8 @@ class Cache $default = Config::get('cache.default'); // 获取默认缓存配置,并连接 $options = Config::get('cache.' . $default['type']) ?: Config::get('cache.default'); - } else { - $options = !empty($options) ? $options : Config::get('cache'); + } elseif (empty($options)) { + $options = Config::get('cache'); } self::$handler = self::connect($options);