From 916ec94e070d70f33e74faddfb9b4ab3c8825146 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 25 Mar 2016 15:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 36250828..02ec90e5 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -599,7 +599,7 @@ class Route $var = []; foreach ($m2 as $key => $val) { // val中定义了多个变量 - if (preg_match_all('/<(\w+)>/', $val, $matches)) { + if (false !== strpos($val, '<') && preg_match_all('/<(\w+)>/', $val, $matches)) { foreach ($matches[1] as $name) { $val = str_replace('<' . $name . '>', '(' . $pattern[$name] . ')', $val); }