改进Input类

This commit is contained in:
thinkphp
2016-05-17 17:13:07 +08:00
parent 5a01b29c30
commit f6efaba3e6

View File

@@ -261,7 +261,7 @@ class Input
if (0 === strpos($name, '?')) {
return self::has(substr($name, 1), $input);
}
if (!empty($input)) {
$data = $input;
$name = (string) $name;
if ('' != $name) {
@@ -291,9 +291,7 @@ class Input
// 强制类型转换
static::typeCast($data, $type);
}
} else {
$data = [];
}
return $data;
}