Null coalescing operator can be used

Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 15:18:35 +03:00
commit f0d6d30def
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
27 changed files with 60 additions and 61 deletions

View file

@ -690,8 +690,8 @@ if ($allowed_forums) {
$passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = " . (int)$user_id . " LIMIT 1");
// Build torrents table
foreach (DB()->fetch_rowset($sql) as $tor) {
$dl = isset($tor['speed_down']) ? $tor['speed_down'] : 0;
$ul = isset($tor['speed_up']) ? $tor['speed_up'] : 0;
$dl = $tor['speed_down'] ?? 0;
$ul = $tor['speed_up'] ?? 0;
$seeds = $tor['seeders'];
$leechs = $tor['leechers'];