From 27bf7b2af9c1b854ddffcaa23f2002dfb9575aef Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 14 Oct 2016 23:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BUrl=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Url.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Url.php b/library/think/Url.php index 2e1fcc19..f0bb30b8 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -132,9 +132,10 @@ class Url $vars = urldecode(http_build_query($vars)); $url .= $suffix . '?' . $vars . $anchor; } else { + $paramType = Config::get('url_param_type'); foreach ($vars as $var => $val) { if ('' !== trim($val)) { - if (Config::get('url_param_type')) { + if ($paramType) { $url .= $depr . urlencode($val); } else { $url .= $depr . $var . $depr . urlencode($val);