Fixed null variables

Co-Authored-By: Constantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
This commit is contained in:
Roman Kelesidis 2023-09-10 00:36:13 +07:00
commit 1ce5edf531

View file

@ -170,20 +170,20 @@ if ($lp_info) {
"; ";
$row = DB()->fetch_row($sql); $row = DB()->fetch_row($sql);
// Verify if torrent registered on tracker and user authorized
if (empty($row['topic_id'])) {
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash));
}
if (empty($row['user_id'])) {
msg_die('Please LOG IN and RE-DOWNLOAD this torrent (user not found)');
}
// Assign variables // Assign variables
$user_id = $row['user_id']; $user_id = $row['user_id'];
$topic_id = $row['topic_id']; $topic_id = $row['topic_id'];
$releaser = (int)($user_id == $row['poster_id']); $releaser = (int)($user_id == $row['poster_id']);
$tor_type = $row['tor_type']; $tor_type = $row['tor_type'];
// Verify if torrent registered on tracker and user authorized
if (empty($topic_id)) {
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash));
}
if (empty($user_id)) {
msg_die('Please LOG IN and RE-DOWNLOAD this torrent (user not found)');
}
// Check hybrid torrents // Check hybrid torrents
$is_hybrid = false; $is_hybrid = false;
if (!empty($row['info_hash']) && !empty($row['info_hash_v2'])) { if (!empty($row['info_hash']) && !empty($row['info_hash_v2'])) {