This commit is contained in:
as2252258@163.com
2021-09-21 02:51:09 +08:00
parent 3e10de58ed
commit 0e2b578b6b
+2 -2
View File
@@ -38,8 +38,8 @@ class Response implements ResponseInterface
'format' => ContentType::JSON, 'format' => ContentType::JSON,
'charset' => 'utf-8' 'charset' => 'utf-8'
]); ]);
$this->withContentType($contentType['format']) $this->withContentType($contentType['format'] ?? ContentType::JSON)
->withCharset($contentType['charset']); ->withCharset($contentType['charset'] ?? 'utf-8');
} }