|
|
@@ -115,7 +115,11 @@ class RotatingFileHandler extends StreamHandler
|
|
|
|
|
|
foreach (array_slice($logFiles, $this->maxFiles) as $file) {
|
|
|
if (is_writable($file)) {
|
|
|
+ // suppress errors here as unlink() might fail if two processes
|
|
|
+ // are cleaning up/rotating at the same time
|
|
|
+ set_error_handler(function ($errno, $errstr, $errfile, $errline) {});
|
|
|
unlink($file);
|
|
|
+ restore_error_handler();
|
|
|
}
|
|
|
}
|
|
|
|