Skip to content

Commit

Permalink
Fix deprecation warning in Carbon 3.2 (#50813)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackWH committed Mar 28, 2024
1 parent f25fcd2 commit 71561e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ protected function getSeconds($ttl)
$duration = $this->parseDateInterval($ttl);

if ($duration instanceof DateTimeInterface) {
$duration = Carbon::now()->diffInRealSeconds($duration, false);
$duration = Carbon::now()->diffInSeconds($duration, false);
}

return (int) ($duration > 0 ? $duration : 0);
Expand Down

0 comments on commit 71561e7

Please sign in to comment.