修正Route类分组的参数

This commit is contained in:
thinkphp
2016-07-04 11:46:14 +08:00
parent 9ff150e81a
commit 60850b2de8

View File

@@ -218,6 +218,7 @@ class Route
public static function rule($rule, $route = '', $type = '*', $option = [], $pattern = [], $group = '') public static function rule($rule, $route = '', $type = '*', $option = [], $pattern = [], $group = '')
{ {
$group = $group ?: self::$group; $group = $group ?: self::$group;
$option = $option ?: self::$option;
$type = strtoupper($type); $type = strtoupper($type);
if (strpos($type, '|')) { if (strpos($type, '|')) {
foreach (explode('|', $type) as $val) { foreach (explode('|', $type) as $val) {