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:
@@ -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';
|
||||
|
Reference in New Issue
Block a user