mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 05:36:45 +02:00
Merge branch '1.x'
This commit is contained in:
@@ -128,7 +128,9 @@ class FilterHandler extends Handler implements ProcessableHandlerInterface, Rese
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered);
|
if (count($filtered) > 0) {
|
||||||
|
$this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -172,4 +172,12 @@ class FilterHandlerTest extends TestCase
|
|||||||
|
|
||||||
$handler->handle($this->getRecord(Logger::WARNING));
|
$handler->handle($this->getRecord(Logger::WARNING));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testHandleEmptyBatch()
|
||||||
|
{
|
||||||
|
$test = new TestHandler();
|
||||||
|
$handler = new FilterHandler($test);
|
||||||
|
$handler->handleBatch(array());
|
||||||
|
$this->assertSame(array(), $test->getRecords());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user