From cf58a56e5859deb622afa8b2522860ff87248b1d Mon Sep 17 00:00:00 2001 From: Fossil Date: Sat, 23 Sep 2023 18:45:55 +0200 Subject: [PATCH] Fix movie year not being parsed correctly --- Blacklight/Movie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Blacklight/Movie.php b/Blacklight/Movie.php index 0228f1aeec..d8465eee36 100755 --- a/Blacklight/Movie.php +++ b/Blacklight/Movie.php @@ -1193,8 +1193,8 @@ protected function localIMDBSearch() ->where('title', 'like', '%'.$this->currentTitle.'%'); if ($this->currentYear !== '') { - $start = Carbon::parse($this->currentYear)->subYears(2)->year; - $end = Carbon::parse($this->currentYear)->addYears(2)->year; + $start = Carbon::createFromFormat('Y', $this->currentYear)->subYears(2)->year; + $end = Carbon::createFromFormat('Y', $this->currentYear)->addYears(2)->year; $check->whereBetween('year', [$start, $end]); } $IMDBCheck = $check->first(['imdbid']);