Skip to content

Commit

Permalink
Move away from deprecated utf_encode() on PHP 8.2+
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored and backportbot[bot] committed Feb 20, 2024
1 parent 6ffffc2 commit 894466e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Log/LogDetails.php
Expand Up @@ -108,7 +108,7 @@ public function logDetailsAsJSON(string $app, $message, int $level): string {
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));
}
}
}
Expand Down

0 comments on commit 894466e

Please sign in to comment.