]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move away from deprecated utf_encode() on PHP 8.2+ 43637/head
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>
Sat, 17 Feb 2024 20:37:34 +0000 (21:37 +0100)
committerGitHub <noreply@github.com>
Sat, 17 Feb 2024 20:37:34 +0000 (21:37 +0100)
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
lib/private/Log/LogDetails.php

index ec88aa767fbe78f7dc378863f63bcad9e44404ce..f8b43881f669dcb026e536180246d5d6ceb19b37 100644 (file)
@@ -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));
                                }
                        }
                }