mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Disable JSON_PRETTY_PRINT due to issue with \SnappyMail\HTTP\Stream
This commit is contained in:
parent
28a7377f97
commit
38daad6d9b
1 changed files with 2 additions and 0 deletions
|
|
@ -30,9 +30,11 @@ class Utils
|
||||||
public static function jsonEncode($value, int $flags = \JSON_INVALID_UTF8_SUBSTITUTE) : string
|
public static function jsonEncode($value, int $flags = \JSON_INVALID_UTF8_SUBSTITUTE) : string
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
/* Issue with \SnappyMail\HTTP\Stream
|
||||||
if (Api::Config()->Get('debug', 'enable', false)) {
|
if (Api::Config()->Get('debug', 'enable', false)) {
|
||||||
$flags |= \JSON_PRETTY_PRINT;
|
$flags |= \JSON_PRETTY_PRINT;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return \json_encode($value, $flags | \JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR);
|
return \json_encode($value, $flags | \JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
Api::Logger()->WriteException($e, \LOG_ERR, 'JSON');
|
Api::Logger()->WriteException($e, \LOG_ERR, 'JSON');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue