Skip to content

Commit

Permalink
Merge pull request #1415 from Fossil01/patch-1
Browse files Browse the repository at this point in the history
Fix movie year not being parsed correctly
  • Loading branch information
DariusIII authored Sep 23, 2023
2 parents eeb211c + cf58a56 commit 929d28d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Blacklight/Movie.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit 929d28d

Please sign in to comment.