diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index 890841f8..de4775c6 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -326,7 +326,14 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE // Exclude padding files [Only for hybrid torrents] if ((isset($f['attr']) ? $f['attr'] : null) !== 'p') { - $totallen += (float) $f['length']; + if (isset($f['length']) && is_numeric($f['length'])) + { + $totallen += (float) $f['length']; + } + else + { + torrent_error_exit($lang['TORFILE_INVALID']); + } } } }