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

Merge pull request #349 from zelgerj/master

fixed resource check for multithreaded usage
This commit is contained in:
Jordi Boggiano
2014-04-08 10:49:02 +02:00

View File

@@ -61,7 +61,7 @@ class StreamHandler extends AbstractProcessingHandler
*/
protected function write(array $record)
{
if (null === $this->stream) {
if (!is_resource($this->stream)) {
if (!$this->url) {
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
}