From 609d5a705ca2ff8bf9bad766c07499c6679053fd Mon Sep 17 00:00:00 2001 From: tale Date: Fri, 29 Jan 2016 15:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.php | 2 +- library/think/Route.php | 2 +- library/think/Template.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helper.php b/helper.php index 61cb5c98..b2fb7828 100644 --- a/helper.php +++ b/helper.php @@ -294,7 +294,7 @@ function trace($log = '[think]', $level = 'log') * @param array $vars 模板变量 * @return string */ -function V($template, $vars) +function V($template = '', $vars = []) { return \think\View::instance(\think\Config::get())->fetch($template, $vars); } diff --git a/library/think/Route.php b/library/think/Route.php index 693a9fc0..269c0a89 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -499,7 +499,7 @@ class Route if (false !== $match = self::match($url, $rule, $pattern)) { // 匹配到路由规则 // 检测是否定义路由 - if ($option['after_behavior']) { + if (!empty($option['after_behavior'])) { Hook::exec($option['after_behavior'], $route); } if ($route instanceof \Closure) { diff --git a/library/think/Template.php b/library/think/Template.php index e967429d..3f07e510 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -56,7 +56,7 @@ class Template */ public function __construct(array $config = []) { - $this->config['cache_path'] = RUNTIME_PATH . 'template' . DS; + $this->config['cache_path'] = RUNTIME_PATH . 'temp' . DS; $this->config = array_merge($this->config, empty($config) ? (array) Config::get('template') : $config); $this->config['taglib_begin'] = $this->stripPreg($this->config['taglib_begin']); $this->config['taglib_end'] = $this->stripPreg($this->config['taglib_end']);