Skip to content

Commit

Permalink
[5.x] Fix session expiry component (#11501)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored Feb 25, 2025
1 parent 7f8ec82 commit 600ecc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/CP/SessionTimeoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public function __invoke()
// remember me would have already been served a 403 error and wouldn't have got this far.
$lastActivity = session('last_activity', now()->timestamp);

return Carbon::createFromTimestamp($lastActivity, config('app.timezone'))
return abs((int) Carbon::createFromTimestamp($lastActivity, config('app.timezone'))
->addMinutes((int) config('session.lifetime'))
->diffInSeconds();
->diffInSeconds());
}
}

0 comments on commit 600ecc5

Please sign in to comment.