From 20662f16e1549904262cc754ddefbdf345967fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8nstantine=20Kovalensky?= <45331093+kovalensky@users.noreply.github.com> Date: Sat, 18 Nov 2023 20:55:37 +0400 Subject: [PATCH] Fix-typo (#1124) --- library/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/includes/functions.php b/library/includes/functions.php index da2b6faaf..a265810f6 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -2066,6 +2066,8 @@ function hash_search($hash) bb_die(sprintf($lang['HASH_INVALID'], $hash)); } + $info_hash = DB()->escape(pack('H*', $hash)); + // Check info_hash version if (mb_strlen($hash, 'UTF-8') == 40) { $info_hash_where = "WHERE info_hash = '$info_hash'"; @@ -2075,8 +2077,6 @@ function hash_search($hash) bb_die(sprintf($lang['HASH_INVALID'], $hash)); } - $info_hash = DB()->escape(pack('H*', $hash)); - if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where")) { redirect(TOPIC_URL . $row['topic_id']); } else {