From 182216830b52ce49c617f082b9ba7f5fabd4fd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8nstantine=20Kovalensky?= <45331093+kovalensky@users.noreply.github.com> Date: Sun, 10 Dec 2023 19:30:10 +0400 Subject: [PATCH] Small code re-format for scrape.php (#1198) --- bt/scrape.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt/scrape.php b/bt/scrape.php index f30abc6ea..93de09b6b 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -30,7 +30,7 @@ if (!isset($info_hash)) { } // Store info hash in hex format -$info_hash_hex = mb_check_encoding($info_hash, 'UTF8') ? $info_hash : bin2hex($info_hash); +$info_hash_hex = bin2hex($info_hash); // Handle multiple hashes @@ -97,7 +97,7 @@ if (!empty($info_hash_count)) { } if (empty($torrents)) { - msg_die('Torrent not registered, info_hash = ' . $info_hash_hex); + msg_die('Torrent not registered, info_hash = ' . (mb_check_encoding($info_hash, 'UTF8') ? $info_hash : $info_hash_hex)); } die(\Arokettu\Bencode\Bencode::encode($torrents));