We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 10617e2 + 4fcb011 commit 037ff0bCopy full SHA for 037ff0b
spec/TH/Lock/FileLockSpec.php
@@ -124,4 +124,13 @@ public function it_can_acquire_then_release_and_acquire_again()
124
125
$this->release();
126
}
127
+
128
+ public function it_does_not_throw_when_lock_file_does_not_exists()
129
+ {
130
+ $this->acquire();
131
132
+ unlink($this->lock_file);
133
134
+ $this->release();
135
+ }
136
src/FileLock.php
@@ -97,7 +97,9 @@ public function release()
97
98
99
if ($this->remove_on_release && $this->flock(LOCK_EX | LOCK_NB)) {
100
- unlink($this->lock_file);
+ if (is_file($this->lock_file)) {
101
102
103
104
105
$this->flock(LOCK_UN);
0 commit comments