1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-24 18:16:10 +02:00

Fix usages of json_encode which did not handle invalid UTF8 gracefully, fixes #1392

This commit is contained in:
Jordi Boggiano
2019-11-12 21:24:23 +01:00
parent e1af546a55
commit 12a76ad61e
16 changed files with 228 additions and 197 deletions

View File

@@ -11,6 +11,8 @@
namespace Monolog\Formatter;
use Monolog\Utils;
/**
* Class FluentdFormatter
*
@@ -71,7 +73,7 @@ class FluentdFormatter implements FormatterInterface
$message['level_name'] = $record['level_name'];
}
return json_encode(array($tag, $record['datetime']->getTimestamp(), $message));
return Utils::jsonEncode(array($tag, $record['datetime']->getTimestamp(), $message));
}
public function formatBatch(array $records)