blob: 66d7a926b391dbc51e279887e1251c86c5ab2b68 (
plain) (
tree)
|
|
diff --git a/src/TorrentFile.php b/src/TorrentFile.php
index 20a7f5e..eddc329 100644
--- a/src/TorrentFile.php
+++ b/src/TorrentFile.php
@@ -621,7 +621,7 @@ class TorrentFile
} else {
$pieceLength = $this->getPieceLength();
$fileTree = self::checkTorrentDict($info, 'file tree', 'array');
- $pieceLayers = self::checkTorrentDict($this->data, 'piece layers', 'array');
+ $pieceLayers = [];
$loopMerkleTree = function (&$merkleTree, &$paths = []) use (&$files, &$size, $pieceLayers, $addFile, $pieceLength, &$loopMerkleTree) {
if (isset($merkleTree[''])) { // reach file
@@ -633,11 +633,6 @@ class TorrentFile
}
$length = self::checkTorrentDict($file, 'length', 'integer');
- if ($length > $pieceLength) { // check pieces root of large file is exist in $root['picec layers'] or not
- if (!array_key_exists($piecesRoot, $pieceLayers)) {
- throw new ParseException('Pieces not exist in piece layers.');
- }
- }
$addFile($paths, $length);
$merkleTree = $length; // rewrite merkleTree to size, it's safe since it not affect $data['info']['file tree']
|