Fixed empty $auth_key after gen passkey (#670)

This commit is contained in:
Roman Kelesidis 2023-04-02 15:18:05 +07:00 committed by GitHub
commit d6b94ac91f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -143,7 +143,7 @@ if ($tor_reged && $tor_info) {
// Magnet link
$passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = " . (int)$bt_user_id . " LIMIT 1");
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key']);
$tor_magnet = create_magnet($tor_info['info_hash'], ($passkey['auth_key'] ?? ''));
// ratio limits
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];