diff --git a/src/Monolog/Handler/DeduplicationHandler.php b/src/Monolog/Handler/DeduplicationHandler.php index 873a4b86..2b1d0b86 100644 --- a/src/Monolog/Handler/DeduplicationHandler.php +++ b/src/Monolog/Handler/DeduplicationHandler.php @@ -148,7 +148,9 @@ class DeduplicationHandler extends BufferHandler throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); } - flock($handle, LOCK_EX); + if (false === flock($handle, LOCK_EX)) { + return; + } $validLogs = []; $timestampValidity = time() - $this->time;