Skip to content

Commit

Permalink
replace deprecated function utf8_encode (#1198)
Browse files Browse the repository at this point in the history
utf8_encode is deprecated since PHP 8.2.0
  • Loading branch information
fabian-coder authored Nov 8, 2023
1 parent a59aaa3 commit dd61302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Froxlor/Idna/IdnaWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd61302

Please sign in to comment.