We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ca6d23 + ff082a7 commit 6254b25Copy full SHA for 6254b25
src/helpers/FileCache.php
@@ -192,7 +192,9 @@ public function lock(string $key): bool
192
{
193
$this->validateKey($key);
194
195
- $this->handles[$key] = fopen($this->tempDir . $key, 'c+');
+ $handle = @fopen($this->tempDir . $key, 'c+');
196
+ if ($handle === false) return false;
197
+ $this->handles[$key] = $handle;
198
return flock($this->handles[$key], LOCK_EX);
199
}
200
0 commit comments