From abf1c86db8bf86c5e5f2cb04090ad00c4f19b9fb Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 27 Oct 2023 14:36:07 +0700 Subject: [PATCH] Expression can be replaced by '??' version (#998) --- 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 f9a7349bd..be24cbd85 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -330,7 +330,7 @@ class Torrent if ($bb_cfg['bt_check_announce_url']) { include INC_DIR . '/torrent_announce_urls.php'; - $ann = isset($tor['announce']) ? $tor['announce'] : ''; + $ann = $tor['announce'] ?? ''; $announce_urls['main_url'] = $bb_cfg['bt_announce_url']; if (!$ann || !\in_array($ann, $announce_urls)) { @@ -339,7 +339,7 @@ class Torrent } } - $info = isset($tor['info']) ? $tor['info'] : []; + $info = $tor['info'] ?? []; if (!isset($info['name'], $info['piece length'])) { self::torrent_error_exit($lang['TORFILE_INVALID']);