Skip to content

Commit

Permalink
Fix issue with expired locks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvester Damgaard committed Feb 8, 2024
1 parent 53bc5f6 commit 9ac6e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/CP/LocksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function store(Request $request)

if ($lock) {
if ($lock->user()?->id() != $user->id()) {
if ($lock->updated_at->lt(Carbon::now()->addSeconds(config('statamic-locks.clear_locks_after', 5) * 60))) {
if ($lock->updated_at->lt(Carbon::now()->subSeconds(config('statamic-locks.clear_locks_after', 5) * 60))) {
// expired
$lock->delete();
$lock = null;
Expand Down

0 comments on commit 9ac6e49

Please sign in to comment.