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.
1 parent 76a813b commit a262341Copy full SHA for a262341
phpfastcache/3.0.0/abstract.php
@@ -280,9 +280,13 @@ protected function readfile($file) {
280
throw new Exception("Can't Read File",96);
281
282
}
283
- while (!feof($file_handle)) {
284
- $line = fgets($file_handle);
285
- $string .= $line;
+ if (flock($file_handle, LOCK_SH | LOCK_NB)) {
+ while (!feof($file_handle)) {
+ $line = fgets($file_handle);
286
+ $string .= $line;
287
+ }
288
+ } else {
289
+ throw new Exception("Can't Read File",96);
290
291
fclose($file_handle);
292
@@ -424,4 +428,4 @@ protected function __setChmodAuto() {
424
428
425
429
426
430
427
-}
431
+}
0 commit comments