summaryrefslogtreecommitdiff
path: root/app/Libraries/Background.php
diff options
context:
space:
mode:
authorhorus2020-04-19 18:07:16 +0200
committerhorus2020-04-19 18:07:16 +0200
commit25b0bf29423c26363f699247d72b68832a9e773e (patch)
treec16b238b8064810e9ca3715c38dfa5745e5adb45 /app/Libraries/Background.php
parent3484356137e16f98c40e0e3e55b4f3fc0630586c (diff)
downloadsenpai-25b0bf29423c26363f699247d72b68832a9e773e.tar.gz
Bugfix
Diffstat (limited to 'app/Libraries/Background.php')
-rw-r--r--app/Libraries/Background.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Libraries/Background.php b/app/Libraries/Background.php
index 30fa1f9..c491d44 100644
--- a/app/Libraries/Background.php
+++ b/app/Libraries/Background.php
@@ -24,8 +24,9 @@ class Background {
return;
}
- $stats = $anime->getStats()->get()->first();
+ $stats = $anime->getStats()->get()->last();
if ( is_null($stats) || is_null($stats->score) ) {
+ echo "saveAiring: getStats() is null. returning for anime:" . $anime->title_pref . " (" . $anime->mal_id . ")\n";
return;
}