From 7bbb794859da278d766a025048a64644842d8a0f Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Thu, 14 Apr 2022 14:05:51 +0800 Subject: [PATCH] fix listRatings() if no PT-Gen data error --- nexus/Torrent/Torrent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/Torrent/Torrent.php b/nexus/Torrent/Torrent.php index 0a4951c0..4cac48d4 100644 --- a/nexus/Torrent/Torrent.php +++ b/nexus/Torrent/Torrent.php @@ -76,7 +76,7 @@ class Torrent } $ptGenInfo = json_decode($torrentInfo['pt_gen'], true); $log = "torrent: " . $torrentInfo['id']; - $siteIdAndRating = $ptGen->listRatings($ptGenInfo, $torrentInfo['url']); + $siteIdAndRating = $ptGen->listRatings($ptGenInfo ?? [], $torrentInfo['url']); $log .= "siteIdAndRating: " . json_encode($siteIdAndRating); do_log($log); return $ptGen->buildRatingSpan($siteIdAndRating);