From f475be3516f2ccf03e5c4f5639f4c6e08972559d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 2 Dec 2015 00:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=97=AD=E5=8C=85=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=20=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9E=20[=20module,c?= =?UTF-8?q?ontroller,=20action=20]=20=E6=95=B0=E7=BB=84=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8A=AB=E6=8C=81=E8=B7=AF=E7=94=B1=20=E5=90=A6=E5=88=99?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=87=AA=E5=B7=B1exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/route.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/library/think/route.php b/library/think/route.php index 08cbcb93..393a8743 100644 --- a/library/think/route.php +++ b/library/think/route.php @@ -273,9 +273,7 @@ class Route // 正则路由 if ($route instanceof \Closure) { // 执行闭包 - $result = self::invokeRegx($route, $matches); - // 如果返回布尔值 则继续执行 - return is_bool($result) ? $result : exit; + return self::invokeRegx($route, $matches); } return self::parseRegex($matches, $route, $regx); } @@ -299,9 +297,7 @@ class Route if (false !== $match = self::match($regx, $rule)) { if ($route instanceof \Closure) { // 执行闭包 - $result = self::invokeRule($route, $match); - // 如果返回布尔值 则继续执行 - return is_bool($result) ? $result : exit; + return self::invokeRule($route, $match); } return self::parseRule($rule, $route, $regx); }