内核更新
This commit is contained in:
@@ -633,7 +633,7 @@ class Request
|
||||
if (true === $name) {
|
||||
// 获取包含文件上传信息的数组
|
||||
$file = $this->file();
|
||||
$data = array_merge($this->param, $file);
|
||||
$data = is_array($file) ? array_merge($this->param, $file) : $this->param;
|
||||
return $this->input($data, '', $default, $filter);
|
||||
}
|
||||
return $this->input($this->param, $name, $default, $filter);
|
||||
@@ -688,7 +688,7 @@ class Request
|
||||
{
|
||||
if (empty($this->post)) {
|
||||
$content = $this->input;
|
||||
if (empty($_POST) && 'application/json' == $this->contentType()) {
|
||||
if (empty($_POST) && false !== strpos($this->contentType(), 'application/json')) {
|
||||
$this->post = (array) json_decode($content, true);
|
||||
} else {
|
||||
$this->post = $_POST;
|
||||
@@ -713,7 +713,7 @@ class Request
|
||||
{
|
||||
if (is_null($this->put)) {
|
||||
$content = $this->input;
|
||||
if ('application/json' == $this->contentType()) {
|
||||
if (false !== strpos($this->contentType(), 'application/json')) {
|
||||
$this->put = (array) json_decode($content, true);
|
||||
} else {
|
||||
parse_str($content, $this->put);
|
||||
@@ -1357,7 +1357,11 @@ class Request
|
||||
{
|
||||
$contentType = $this->server('CONTENT_TYPE');
|
||||
if ($contentType) {
|
||||
list($type) = explode(';', $contentType);
|
||||
if (strpos($contentType, ';')) {
|
||||
list($type) = explode(';', $contentType);
|
||||
} else {
|
||||
$type = $contentType;
|
||||
}
|
||||
return trim($type);
|
||||
}
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user