Browse Source

undefined index on sickrage - Fix #1038

causefx 7 năm trước cách đây
mục cha
commit
1cabad7515
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      api/functions/homepage-connect-functions.php

+ 2 - 2
api/functions/homepage-connect-functions.php

@@ -1768,9 +1768,9 @@ function getSickrageCalendarHistory($array, $number)
 			"topTitle" => $seriesName,
 			"bottomTitle" => $bottomTitle,
 			"overview" => '',
-			"runtime" => $child['series']['runtime'],
+			"runtime" => isset($child['series']['runtime']) ? $child['series']['runtime'] : 30,
 			"image" => $fanart,
-			"ratings" => $child['series']['ratings']['value'],
+			"ratings" => isset($child['series']['ratings']['value']) ? $child['series']['ratings']['value'] : "unknown",
 			"videoQuality" => isset($child["quality"]) ? $child['quality'] : "unknown",
 			"audioChannels" => "",
 			"audioCodec" => "",