From 06e97a0be9ed375bd475a28679d3973a11ac598b Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 23 Jan 2016 13:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3View=E7=B1=BB=E7=9A=84getTemp?= =?UTF-8?q?lateTheme=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/View.php b/library/think/View.php index 2e608cf3..8413b7b4 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -245,7 +245,7 @@ class View } elseif (Cookie::get('think_theme')) { $theme = Cookie::get('think_theme'); } - if (!is_dir(APP_PATH . (APP_MULTI_MODULE ? $module . DS : '') . $this->config['view_layer'] . DS . $theme)) { + if (!isset($theme) || !is_dir(APP_PATH . (APP_MULTI_MODULE ? $module . DS : '') . $this->config['view_layer'] . DS . $theme)) { $theme = $this->config['default_theme']; } Cookie::set('think_theme', $theme, 864000);