mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 01:26:11 +02:00
Fix usages of json_encode which did not handle invalid UTF8 gracefully, fixes #1392
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Utils;
|
||||
|
||||
/**
|
||||
* Logs to Cube.
|
||||
@@ -119,9 +120,9 @@ class CubeHandler extends AbstractProcessingHandler
|
||||
$data['data']['level'] = $record['level'];
|
||||
|
||||
if ($this->scheme === 'http') {
|
||||
$this->writeHttp(json_encode($data));
|
||||
$this->writeHttp(Utils::jsonEncode($data));
|
||||
} else {
|
||||
$this->writeUdp(json_encode($data));
|
||||
$this->writeUdp(Utils::jsonEncode($data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user