mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Fixed a bug causing inability to view file contents for some torrents (#328)
Co-authored-by: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
This commit is contained in:
parent
866ce7726f
commit
47efd4944b
@ -58,7 +58,7 @@ class torrent
|
||||
|
||||
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['/']);
|
||||
@ -115,7 +115,7 @@ class torrent
|
||||
{
|
||||
$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] = array();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user