From afc4fef756cf4754056cfb8602447cf50aaf5a40 Mon Sep 17 00:00:00 2001 From: GaziYucel Date: Tue, 30 Apr 2024 15:53:33 +0200 Subject: [PATCH] json_encode JSON_UNESCAPED_UNICODE --- classes/Helpers/LogHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Helpers/LogHelper.php b/classes/Helpers/LogHelper.php index 24eb8997..28df6fe1 100755 --- a/classes/Helpers/LogHelper.php +++ b/classes/Helpers/LogHelper.php @@ -80,7 +80,7 @@ private static function processMessage(mixed $message, string $level): string // convert message to string if (is_object($message) || is_array($message)) { - $message = json_encode($message, JSON_UNESCAPED_SLASHES); + $message = json_encode($message, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); if (json_last_error() !== JSON_ERROR_NONE) $message = var_export($message, true); } @@ -94,7 +94,7 @@ private static function processMessage(mixed $message, string $level): string $backTrace[2]['class'] . '\\' . $backTrace[2]['function'] . ': ' . $message . "\n"; // add extra debug information if debug level - if($level === 'DBG') { + if ($level === 'DBG') { $backTrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); $message .= ' ' . json_encode($backTrace, JSON_UNESCAPED_SLASHES) . "\n"; }