修正Url类的getRouteUrl方法

This commit is contained in:
thinkphp
2016-06-27 15:28:35 +08:00
parent 32c5e00bf4
commit 5bf12f6c18

View File

@@ -241,8 +241,11 @@ class Url
}
$match = true;
}
if (empty($pattern) && empty($param)) {
if (empty($pattern)) {
// 没有任何变量
if ($param) {
$vars = array_diff_key($array, $param);
}
return $url;
} elseif ($match && (empty($param) || array_intersect_assoc($param, $array) == $param)) {
// 存在变量定义