mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Fixed a bug causing inability to view file contents for some torrents (#1084)
This commit is contained in:
parent
d2e56aa0c8
commit
618a93e056
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class TorrentFileList
|
|||
$this->build_filelist_array();
|
||||
|
||||
if ($this->multiple) {
|
||||
if ($this->files_ary['/'] !== '') {
|
||||
if (!empty($this->files_ary['/'])) {
|
||||
$this->files_ary = array_merge($this->files_ary, $this->files_ary['/']);
|
||||
unset($this->files_ary['/']);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class TorrentFileList
|
|||
for ($i = 0, $j = 1; $i < $subdir_count; $i++, $j++) {
|
||||
$subdir = $f['path'][$i];
|
||||
|
||||
if (!isset($cur_files_ary[$subdir])) {
|
||||
if (!isset($cur_files_ary[$subdir]) || !is_array($cur_files_ary[$subdir])) {
|
||||
$cur_files_ary[$subdir] = [];
|
||||
}
|
||||
$cur_files_ary =& $cur_files_ary[$subdir];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue