From dd61302445d4c35554abc9ef064831ae6f9ffeda Mon Sep 17 00:00:00 2001 From: Fabian Welzer Date: Wed, 8 Nov 2023 10:27:04 +0100 Subject: [PATCH] replace deprecated function utf8_encode (#1198) utf8_encode is deprecated since PHP 8.2.0 --- lib/Froxlor/Idna/IdnaWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Froxlor/Idna/IdnaWrapper.php b/lib/Froxlor/Idna/IdnaWrapper.php index 6ad750a041..0fc4228718 100644 --- a/lib/Froxlor/Idna/IdnaWrapper.php +++ b/lib/Froxlor/Idna/IdnaWrapper.php @@ -64,7 +64,7 @@ public function __construct() */ public function encode(string $to_encode): string { - $to_encode = $this->isUtf8($to_encode) ? $to_encode : utf8_encode($to_encode); + $to_encode = $this->isUtf8($to_encode) ? $to_encode : mb_convert_encoding($to_encode, 'UTF-8'); try { return $this->idna_converter->encode($to_encode); } catch (InvalidArgumentException $iae) {