mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-19 23:56:17 +02:00
Fix usages of json_encode which did not handle invalid UTF8 gracefully, fixes #1392
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Formatter\FormatterInterface;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Utils;
|
||||
use Monolog\Handler\Slack\SlackRecord;
|
||||
|
||||
/**
|
||||
@@ -118,7 +119,7 @@ class SlackHandler extends SocketHandler
|
||||
$dataArray['token'] = $this->token;
|
||||
|
||||
if (!empty($dataArray['attachments'])) {
|
||||
$dataArray['attachments'] = json_encode($dataArray['attachments']);
|
||||
$dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']);
|
||||
}
|
||||
|
||||
return $dataArray;
|
||||
|
Reference in New Issue
Block a user