summaryrefslogtreecommitdiff
path: root/app/Libraries/Helper.php
diff options
context:
space:
mode:
authorhorus2020-03-10 01:39:27 +0100
committerhorus2020-03-10 01:39:27 +0100
commit0679190dfe45007ce3eb53ac139b344e0d724540 (patch)
tree8ed09bb9820062b940f157c9405072f5deae2cd6 /app/Libraries/Helper.php
parent75e57c66dd49c55acb29d31693ddd022032b54fb (diff)
downloadsenpai-0679190dfe45007ce3eb53ac139b344e0d724540.tar.gz
Nasty bug fix.
Diffstat (limited to 'app/Libraries/Helper.php')
-rw-r--r--app/Libraries/Helper.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php
index 65d774b..7d89b2c 100644
--- a/app/Libraries/Helper.php
+++ b/app/Libraries/Helper.php
@@ -64,6 +64,9 @@ class Helper {
$stats = $anime->getStats()->get()->first();
$airing = $anime->getAiring()->get()->first();
+ if ( is_null($airing) ) {
+ echo "setCalendar: There is a bug: Anime can't be null.";
+ }
/**
* Check for duplicate entry.
*/
@@ -123,6 +126,7 @@ class Helper {
* Check for anime which aren't watched anymore and delete them.
*/
$not_watched = DB::table('is_watching')
+ ->where('user_id', $user->id)
->whereNotIn('mal_id', $actually_watching)
->delete();
}