Skip to content

Commit 2029e50

Browse files
axiAlexis Urien
andauthored
Fix potentials handlers added multiple times (#434)
Co-authored-by: Alexis Urien <alexis@smiile.com>
1 parent 9da4359 commit 2029e50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,8 @@ private function addChannelsSection(ArrayNodeDefinition $handerNode)
10731073
return null;
10741074
}
10751075

1076-
return ['type' => $isExclusive ? 'exclusive' : 'inclusive', 'elements' => $elements];
1076+
// de-duplicating $elements here in case the handlers are redefined, see https://github.com/symfony/monolog-bundle/issues/433
1077+
return ['type' => $isExclusive ? 'exclusive' : 'inclusive', 'elements' => array_unique($elements)];
10771078
})
10781079
->end()
10791080
->children()

0 commit comments

Comments
 (0)