1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 07:06:40 +02:00

Merge pull request #1287 from cvuorinen/1286-fopen-check

Check file was opened successfully before trying to read/write
This commit is contained in:
Jordi Boggiano
2019-06-30 18:16:21 +02:00
committed by GitHub

View File

@@ -137,6 +137,11 @@ class DeduplicationHandler extends BufferHandler
}
$handle = fopen($this->deduplicationStore, 'rw+');
if (!$handle) {
throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore);
}
flock($handle, LOCK_EX);
$validLogs = [];