add trim to filterInfoHash method

This commit is contained in:
ghost 2023-09-04 01:38:55 +03:00
parent 6c73a68024
commit c32a3b5f7d

View file

@ -21,14 +21,16 @@ class Magnet {
public static function filterInfoHash(string $value) : string public static function filterInfoHash(string $value) : string
{ {
return str_replace( return trim(
[ str_replace(
'urn:', [
'btih:', 'urn:',
'btmh:', 'btih:',
], 'btmh:',
false, ],
$value false,
$value
)
); );
} }