From 29a5fa935025ad5d22b1bc513b687b0a573857dc Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 1 Apr 2016 19:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Url.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/think/Url.php b/library/think/Url.php index fcec98e8..20d6fec9 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -227,9 +227,10 @@ class Url $match = true; } if (empty($pattern) && empty($param)) { - // 没有任何变量定义 + // 没有任何变量 return $url; - } elseif (array_intersect($param, $array) == $param) { + } elseif (!empty($match) || !empty($param) && array_intersect($param, $array) == $param) { + // 存在变量定义 $vars = array_diff($array, $param); return $url; }