1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 13:46:38 +02:00

Check file was opened successfully before trying to read/write

Fixes #1286
This commit is contained in:
Carl Vuorinen
2019-02-04 09:07:35 +02:00
parent ebb804e432
commit b351406bb3

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 = [];