1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2016-09-29 09:29:36 +02:00

View File

@@ -83,6 +83,10 @@ class NormalizerFormatter implements FormatterInterface
$normalized = [];
$count = 1;
if ($data instanceof \Generator && !$data->valid()) {
return array('...' => 'Generator is already consumed, aborting');
}
foreach ($data as $key => $value) {
if ($count++ >= 1000) {
$normalized['...'] = 'Over 1000 items, aborting normalization';