Transfer from array to ArrayObject data type (#1019)

This commit is contained in:
Cønstantine Kovalensky 2023-11-03 14:11:45 +04:00 committed by GitHub
commit 79116b2c27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View file

@ -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