diff --git a/library/ajax/view_torrent.php b/library/ajax/view_torrent.php index afa68f32..f06356c5 100644 --- a/library/ajax/view_torrent.php +++ b/library/ajax/view_torrent.php @@ -104,7 +104,7 @@ class torrent continue; } // Exclude padding files - if (($f['attr'] ?? null) === 'p') + if ((isset($f['attr']) ? $f['attr'] : null) === 'p') { continue; } diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index e0b041de..8e7a846b 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -297,7 +297,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE // Check if torrent contains info_hash v2 $bt_v2 = false; - if (($info['meta version'] ?? null) == 2 && is_array($info['file tree'] ?? null)) + if ((isset($info['meta version']) ? $info['meta version'] : null) == 2 && is_array(isset($info['file tree']) ? $info['file tree'] : null)) { $bt_v2 = true; } @@ -338,7 +338,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE foreach ($info['files'] as $fn => $f) { // Exclude padding files - if (($f['attr'] ?? null) !== 'p') + if ((isset($f['attr']) ? $f['attr'] : null) !== 'p') { $totallen += (float) $f['length']; }