mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Transfer from array to ArrayObject data type (#1019)
This commit is contained in:
parent
3ba3b5a8db
commit
79116b2c27
4 changed files with 8 additions and 6 deletions
|
@ -37,7 +37,7 @@ if (!$tor = \Arokettu\Bencode\Bencode::decode($file_contents)) {
|
|||
}
|
||||
|
||||
$torrent = new TorrentPier\Legacy\TorrentFileList($tor);
|
||||
if (($tor['info']['meta version'] ?? null) == 2 && is_array($tor['info']['file tree'] ?? null)) {
|
||||
if (($tor['info']['meta version'] ?? null) == 2) {
|
||||
$tor_filelist = $torrent->fileTreeList($tor['info']['file tree'], $tor['info']['name'] ?? ''); // v2
|
||||
} else {
|
||||
$tor_filelist = $torrent->get_filelist(); // v1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue