We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18c6f99 commit 45baf39Copy full SHA for 45baf39
1 file changed
system/Cache/Handlers/FileHandler.php
@@ -334,7 +334,11 @@ protected function getItem(string $key)
334
*/
335
protected function writeFile($path, $data, $mode = 'wb')
336
{
337
- $fp = fopen($path, $mode);
+ if (($fp = @fopen($path, $mode)) === false)
338
+ {
339
+ return false;
340
+ }
341
+
342
flock($fp, LOCK_EX);
343
344
for ($result = $written = 0, $length = strlen($data); $written < $length; $written += $result)
0 commit comments