修正Route类分组的参数

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

View File

@@ -217,8 +217,9 @@ 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;
$type = strtoupper($type); $option = $option ?: self::$option;
$type = strtoupper($type);
if (strpos($type, '|')) { if (strpos($type, '|')) {
foreach (explode('|', $type) as $val) { foreach (explode('|', $type) as $val) {
self::rule($rule, $route, $val, $option, $pattern, $group); self::rule($rule, $route, $val, $option, $pattern, $group);