From 0d6a188ae748e422a28adac60479d9562d13e3a5 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 15:52:18 +0400 Subject: [PATCH] Don't check for announce-list while adding new urls (#1116) @belomaxorka is the only one nigga I need in my life :D --- src/Legacy/Torrent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index c56b64e57..263c5b4d4 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -568,8 +568,8 @@ class Torrent // Delete all additional urls if ($bb_cfg['bt_del_addit_ann_urls'] || $bb_cfg['bt_disable_dht']) { unset($tor['announce-list']); - } elseif (isset($tor['announce-list'])) { - $tor['announce-list'] = array_merge($tor['announce-list'], [[$announce]], $announce_urls_add); + } else { + $tor['announce-list'] = array_merge($tor['announce-list'] ?? [], [[$announce]], $announce_urls_add); } // Add retracker