mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Minor improvements (#231)
This commit is contained in:
parent
de00055c6a
commit
0a1a036eff
@ -104,7 +104,7 @@ class torrent
|
||||
continue;
|
||||
}
|
||||
// Exclude padding files
|
||||
if (($f['attr'] ?? null) === 'p')
|
||||
if ((isset($f['attr']) ? $f['attr'] : null) === 'p')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -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'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user