Skip to content

Commit

Permalink
修正单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Apr 1, 2016
1 parent d5516d7 commit 29a5fa9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/think/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,10 @@ public static function getRouteUrl($alias, &$vars = [])
$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;
}
Expand Down

0 comments on commit 29a5fa9

Please sign in to comment.