改进Route类的import方法

This commit is contained in:
thinkphp
2016-05-26 11:18:09 +08:00
parent 4c456e3b4e
commit ccf4c2fdd6

View File

@@ -162,10 +162,10 @@ class Route
if (is_numeric($key)) {
$key = array_shift($val);
}
if (empty($val)) {
continue;
}
if (0 === strpos($key, '[')) {
if (empty($val)) {
continue;
}
$key = substr($key, 1, -1);
$result = ['routes' => $val, 'option' => [], 'pattern' => []];
} elseif (is_array($val)) {