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:
@@ -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 = [];
|
||||
|
||||
|
Reference in New Issue
Block a user