Skip to content

Commit

Permalink
fix get content type
Browse files Browse the repository at this point in the history
  • Loading branch information
林文弟 committed Jun 8, 2021
1 parent 8d7d432 commit 2edb55f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Logger/Monolog/Handler/AliyunLogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function write(array $record):void
'context' => json_encode($record, JSON_UNESCAPED_UNICODE),
'ip' => request()->getClientIp(),
'header' => $this->getHeader(),
'contentType' => request()->getContentType(),
'contentType' => request()->getContentType() ?? '',
];
$logs = [new LogItem($data)];
$client = new Client($this->endpoint, $this->accessKeyId, $this->accessKeySecret);
Expand Down

0 comments on commit 2edb55f

Please sign in to comment.