改进Route类setRule方法 修正BelongsToMany类的attach方法

This commit is contained in:
thinkphp
2016-12-22 17:55:35 +08:00
parent 6eedbc5a0a
commit 3a78c93d11
2 changed files with 6 additions and 3 deletions

View File

@@ -296,12 +296,14 @@ class Route
} elseif ('$' == substr($rule, -1, 1)) {
// 是否完整匹配
$option['complete_match'] = true;
$rule = substr($rule, 0, -1);
}
} elseif (empty($option['complete_match']) && '$' == substr($rule, -1, 1)) {
// 是否完整匹配
$option['complete_match'] = true;
$rule = substr($rule, 0, -1);
}
if (true == $option['complete_match'] && '$' == substr($rule, -1, 1)) {
$rule = substr($rule, 0, -1);
}
if ('/' != $rule || $group) {