Disable JSON_PRETTY_PRINT due to issue with \SnappyMail\HTTP\Stream

This commit is contained in:
the-djmaze 2022-11-17 11:29:00 +01:00
parent 28a7377f97
commit 38daad6d9b

View file

@ -30,9 +30,11 @@ class Utils
public static function jsonEncode($value, int $flags = \JSON_INVALID_UTF8_SUBSTITUTE) : string
{
try {
/* Issue with \SnappyMail\HTTP\Stream
if (Api::Config()->Get('debug', 'enable', false)) {
$flags |= \JSON_PRETTY_PRINT;
}
*/
return \json_encode($value, $flags | \JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR);
} catch (\Throwable $e) {
Api::Logger()->WriteException($e, \LOG_ERR, 'JSON');