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,
'charset' => 'utf-8'
]);
$this->withContentType($contentType['format'])
->withCharset($contentType['charset']);
$this->withContentType($contentType['format'] ?? ContentType::JSON)
->withCharset($contentType['charset'] ?? 'utf-8');
}