From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:37:34 +0000 (+0100) Subject: Move away from deprecated utf_encode() on PHP 8.2+ X-Git-Tag: v29.0.0beta1~195^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F43637%2Fhead;p=nextcloud-server.git Move away from deprecated utf_encode() on PHP 8.2+ Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php index ec88aa767fb..f8b43881f66 100644 --- a/lib/private/Log/LogDetails.php +++ b/lib/private/Log/LogDetails.php @@ -106,7 +106,7 @@ abstract class LogDetails { if (is_string($value)) { $testEncode = json_encode($value, JSON_UNESCAPED_SLASHES); if ($testEncode === false) { - $entry[$key] = utf8_encode($value); + $entry[$key] = mb_convert_encoding($value, 'UTF-8', mb_detect_encoding($value)); } } }