From 0679190dfe45007ce3eb53ac139b344e0d724540 Mon Sep 17 00:00:00 2001 From: horus Date: Tue, 10 Mar 2020 01:39:27 +0100 Subject: Nasty bug fix. --- app/Libraries/Helper.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/Libraries/Helper.php') 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(); } -- cgit v1.2.3