From 4c0a9c0bc692cb96786fca3f8952d6a05aea8c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8nstantine=20Kovalensky?= <45331093+kovalensky@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:34:00 +0400 Subject: [PATCH] Typo (#1168) --- src/Legacy/Torrent.php | 6 ++++-- src/Legacy/TorrentFileList.php | 4 ++-- styles/templates/default/viewtopic_attach.tpl | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index 0e26b1ce9..130940365 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -394,11 +394,13 @@ class Torrent foreach ($info['files'] as $fn => $f) { // Exclude padding files if (($f['attr'] ?? null) !== 'p') { - $totallen += (isset($f['length']) && is_numeric($f['length'])) ? (float)$f['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']); + $totallen += (isset($f['length']) && is_numeric($f['length'])) ? $f['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']); } } + $totallen = (float)$totallen; } elseif (isset($bt_v2)) { $fileTreeSize = function (array $array, string $name = '') use (&$fileTreeSize) { + global $lang; $size = 0; @@ -406,7 +408,7 @@ class Torrent if (!isset($value[''])) { $size += $fileTreeSize($value); } else { - $size += (isset($value['']['length']) && is_numeric($value['']['length'])) ? (float)$value['']['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']); + $size += (isset($value['']['length']) && is_numeric($value['']['length'])) ? $value['']['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']); } } diff --git a/src/Legacy/TorrentFileList.php b/src/Legacy/TorrentFileList.php index 19e997f71..6594df548 100644 --- a/src/Legacy/TorrentFileList.php +++ b/src/Legacy/TorrentFileList.php @@ -147,7 +147,7 @@ class TorrentFileList $html_v2 = $this->fileTreeList($value); $allItems .= "
$root
{postrow.attach.tor_reged.FILESIZE}
- +