Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb05fab

Browse files
committed
bug #39442 Fix enabled key for ratelimiter config (pierredup)
This PR was squashed before being merged into the 5.2 branch. Discussion ---------- Fix enabled key for ratelimiter config | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A The `enabled` key doesn't always exist in the config when using the ratelimiter component, which causes an undefined index error Commits ------- d48e2c2 Fix enabled key for ratelimiter config
2 parents 26e1e6b + d48e2c2 commit cb05fab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ private function addRateLimiterSection(ArrayNodeDefinition $rootNode)
18161816
->ifTrue(function ($v) { return \is_array($v) && !isset($v['limiters']) && !isset($v['limiter']); })
18171817
->then(function (array $v) {
18181818
$newV = [
1819-
'enabled' => $v['enabled'],
1819+
'enabled' => $v['enabled'] ?? true,
18201820
];
18211821
unset($v['enabled']);
18221822

0 commit comments

Comments
 (0)