diff --git a/src/bundle/DependencyInjection/Configuration.php b/src/bundle/DependencyInjection/Configuration.php index d25f8c88..8c4f1172 100644 --- a/src/bundle/DependencyInjection/Configuration.php +++ b/src/bundle/DependencyInjection/Configuration.php @@ -15,6 +15,7 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Http\Authenticator\Token\PostAuthenticationToken; use function interface_exists; +use function is_iterable; /** * @final @@ -225,12 +226,14 @@ private function addGoogleAuthenticatorConfiguration(ArrayNodeDefinition $rootNo } /** + * @param iterable $iterableValue + * * @return iterable */ - private static function flatten(array $arrayValue): iterable + private static function flatten(iterable $iterableValue): iterable { - foreach ($arrayValue as $value) { - if (is_array($value)) { + foreach ($iterableValue as $value) { + if (is_iterable($value)) { foreach (self::flatten($value) as $x) { yield $x; }