From 8f40c30cdf20529dbc934c453df9a078079c36ab Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 14 Jun 2021 13:16:21 +0800 Subject: [PATCH] fix TechnicalInformation --- include/functions.php | 26 +++++++++++++------------- nexus/Torrent/TechnicalInformation.php | 2 +- public/details.php | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/functions.php b/include/functions.php index 3e6bbb54..e7c59003 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3075,19 +3075,19 @@ function torrenttable($rows, $variant = "torrent") { $imdb = new Nexus\Imdb\Imdb(); $torrent = new Nexus\Torrent\Torrent(); $torrentSeedingLeechingStatus = $torrent->listLeechingSeedingStatus($CURUSER['id'], array_column($rows, 'id')); - - if ($variant == "torrent"){ - $last_browse = $CURUSER['last_browse']; - $sectiontype = $browsecatmode; - } - elseif($variant == "music"){ - $last_browse = $CURUSER['last_music']; - $sectiontype = $specialcatmode; - } - else{ - $last_browse = $CURUSER['last_browse']; - $sectiontype = ""; - } + $last_browse = $CURUSER['last_browse']; +// if ($variant == "torrent"){ +// $last_browse = $CURUSER['last_browse']; +// $sectiontype = $browsecatmode; +// } +// elseif($variant == "music"){ +// $last_browse = $CURUSER['last_music']; +// $sectiontype = $specialcatmode; +// } +// else{ +// $last_browse = $CURUSER['last_browse']; +// $sectiontype = ""; +// } $time_now = TIMENOW; if ($last_browse > $time_now) { diff --git a/nexus/Torrent/TechnicalInformation.php b/nexus/Torrent/TechnicalInformation.php index 0f6a11b7..ad8c35cb 100644 --- a/nexus/Torrent/TechnicalInformation.php +++ b/nexus/Torrent/TechnicalInformation.php @@ -79,7 +79,7 @@ class TechnicalInformation public function getRefFrame() { - foreach ($this->mediaInfoArr['Video'] as $key => $value) { + foreach ($this->mediaInfoArr['Video'] ?? [] as $key => $value) { if (strpos($key, 'Reference frames') !== false) { return $value; } diff --git a/public/details.php b/public/details.php index 408fd168..ff19bbf2 100644 --- a/public/details.php +++ b/public/details.php @@ -481,7 +481,7 @@ echo ""; } }else $no_give = $lang_details['text_no_magic_added']; - if(intval($bonus_has) < intval($arr_temp[0])){ + if(isset($bonus_has) && isset($arr_temp) && intval($bonus_has) < intval($arr_temp[0])){ }else if ($whether_have_give_value == 0 ) { $magic_value_button = '';