diff --git a/src/Monolog/Handler/SocketHandler.php b/src/Monolog/Handler/SocketHandler.php index a829f057..4e1410ab 100644 --- a/src/Monolog/Handler/SocketHandler.php +++ b/src/Monolog/Handler/SocketHandler.php @@ -265,6 +265,10 @@ class SocketHandler extends AbstractProcessingHandler throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); } + if (null === $this->chunkSize) { + throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); + } + return stream_set_chunk_size($this->resource, $this->chunkSize); }