Skip to content

Commit ea558fc

Browse files
author
itismadness
committed
Replace deprecated utf8_encode function
1 parent 42f5170 commit ea558fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
}
1616
},
1717
"require": {
18-
"php": ">=7.2"
18+
"php": ">=7.2",
19+
"ext-mbstring": "*"
1920
},
2021
"require-dev": {
2122
"phpunit/phpunit": "^8",

src/BencodeTorrent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct()
4545
private function setDelim(): void
4646
{
4747
if (self::$utf8_filelist_delim === null) {
48-
self::$utf8_filelist_delim = utf8_encode(chr(self::FILELIST_DELIM));
48+
self::$utf8_filelist_delim = mb_convert_encoding(chr(self::FILELIST_DELIM), 'UTF-8', 'ISO-8859-1');
4949
}
5050
}
5151

0 commit comments

Comments
 (0)